Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.

C Programming :: Arrays

Home > C Programming > Arrays > General Questions

31. Match the following with reference to the following program code.

#include

void main ()
{
int x [3][4] = {{1,6,9,12},{11,17,3,2},{20,23,4,5}};
int *n = &x;
}
(i) *(*(x + 1) + 1) (1) 9
(ii) *(*x + 1) + 3 (2) 13
(iii) *(n + 3) + 1 (3) 4
(iv) ++(*n++) + *n (4) 17

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Commvault 

32. Which statement is wrong given the following code?

int a[] = {5, 7, 9}, *p = a, b;

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

error: lvalue required as increment operand

Workspace

Tags:

Commvault 

33. What is the output of the program?

#include
void main () {
int mat [4][5] = {1,2,3,4,5,6,7,8,9,10,11,12};
printf("%d %d ", *mat[*(mat[3] + 2)], 2[5 + 2[mat] - 3]);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Commvault 

34. Declare the following statement ?

"An Array of three pointers to chars"

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

nagarro 

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Wipro 

36. What will be the output?

void main()
{
int a[]={1,3,5,7};
printf("%d",&a[3]-&a[1]);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

&a[i] = &a + i;

Hence, &a[3] - &a[1] = (&a + 3) - (&a + 1) = 2

Workspace

Tags:

Wipro 

37.  What will be output of the following "c" code?

#include
void main()
{
char s[]={'a', 'b', 'c', '\n', 'c', '\0'};
char *p, *str, *str1;
p= &s[3];
str= p;
str1= s;
printf("%d", ++*p++*str1-32);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

38. What will be output of the following "c" code?

#include
void main()
{
int c[]={2.8,3.4,4,6.7,5};
int j, *p=c, *q=c;
for(j=0; j<5; j++)
{
printf("%d", *c);
++q;
}
for(j=0; j<5; j++)
{
printf("%d", *p);
++p;
}
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

39. What will be output of the following "c" code?

#include
void main()
{
int i, a[50]={1,2,3,4,5};
for( i=0; i<5; i++)
printf("%d",*a++);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

40. lf S is an array of 80 characters, then the value assigned to S through the statement scanf("%s" ,S) with input 12345 would be

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!