3,700 views

1 Answer

Best answer
3 3 votes

 

The name arr2D refers to the beginning of all the 3 arrays containing 3 integer each.

*arr2D refers to the start of the first 1D array (of 3 integers) that is the same address as arr2D.

So the expression (arr2D == *arr2D) is true (1).

Similarly, *arr2D is nothing but *(arr2D + 0). Again arr2D[0] is the another way of writing *(arr2D + 0).

So the expression (*(arr2D + 0) == arr2D[0]) is true (1). 

Ans- 1 && 1 = 1

selected by
Position:
Show:

Related questions

1 1 vote
2 answers 2 answers
2.0k
2.0k views
Desert_Warrior asked May 16, 2016
2,023 views
#include <stdio.h int main() { int a[][3] = {1, 2, 3, 4, 5, 6}; int (*ptr)[3] = a; // LINE 5 printf("%d %d ", (*ptr) , (*ptr) ); //LINE 6 ++ptr; printf("%d %d\n", (*ptr) ...
8 8 votes
1 answers 1 answer
1.9k
1.9k views
Desert_Warrior asked May 16, 2016
1,912 views
#include <stdio.h void f(char ); int main() { char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl" }; f(argv); return 0; } void f(char p) { char *t; t = (p += sizeof(int)...
0 0 votes
1 answers 1 answer
937
937 views
Desert_Warrior asked May 16, 2016
937 views
#include<stdio.h int a = 10; int main() { fun(); fun(); return 0; } int fun() { static int a = 1; printf("%d ",a); a++; return 0; }
0 0 votes
1 answers 1 answer
961
961 views
Desert_Warrior asked May 16, 2016
961 views
#include<stdio.h #include<stdlib.h int main() { char s[] = "Opendays2012"; int i = 0; while(*(s++)) i++; printf("%d",i); return 0; }(a) Segmentation Fault (b) Compile Err...