Discussion :: Arrays
-
What will be the output of the program ?
#include
int main() { static int a[2][2] = {1, 2, 3, 4}; int i, j; static int *p[] = {(int*)a, (int*)a+1, (int*)a+2}; for(i=0; i2; i++) { for(j=0; j2; j++) { printf("%d, %d, %d, %d\n", *(*(p+i)+j), *(*(j+p)+i), *(*(i+p)+j), *(*(p+j)+i)); } } return 0; }
A.
1, 1, 1, 1 |
B.
1, 2, 1, 2 |
C.
1, 1, 1, 1 |
D.
1, 2, 3, 4 |
Answer : Option C
Explanation :
No answer description available for this question.
Be The First To Comment