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 a[3][4] = {1, 2, 3, 4, 4, 3, 2, 1, 7, 8, 9, 0};
printf("%u, %u\n", a+1, &a+1);
return 0;
}
- 65430, 43569
- 65239, 64763
- 65480, 65496
- 61123, 74123
#include <stdio.h>
int main()
{
foo(ary);
}
void foo(int **ary)
{
int i = 10, k = 10, j = 2;
int *ary[2];
ary[0] = &i;
ary[1] = &j;
printf("%d\n", ary[0][1]);
}
- compile time error
- Runtime error
- Output : 20
- Undefined Behaviour
- An array element may be an array by itself
- Strictly speaking C supports 1-dimensional arrays only
- Both A and C
- Array elements need not occupy contiguous memory locations
- An array size can not changed once it is created.
- Array element value can be changed any number of times
- To access Nth element of an array students, use students[n-1] as the starting index is 0.
- None of these