C Programming Array's Multiple Choice Questions And Answers
Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:
List of Programming Full Forms
#include <stdio.h>
int main()
{
int ary[2][3][4], j = 20;
ary[0][0] = &j;
printf("%d\n", *ary[0][0]);
}
- Junk Value
- No output
- Compile time Error
- Address of j
#include<stdio.h>
int main()
{
int arr[5], i=0;
while(i<5)
arr[i]=++i;
for(i=0; i<5; i++)
printf("%d, ", arr[i]);
return 0;
}
- 1,2,3,4
- Garbage value, 1, 2, 3, 4,
- 2,4
- none of these
- Base address is the address of 0th index element.
- An array b[] base address is &b[0]
- An array b[] base address can be printed with printf("%d", b);
- None of the above
- True.
- False.
- C's asset
- C's shortcoming
- assigns 4 to a [4]
- what is assigned is compiler-dependent
- assigns 4 to a [5]
- assigns 4 to a [6]