Possible Duplicate:
Is array name a pointer in C?
I was running the following code
#include <stdio.h> int main() { int a[4] = {1,2,3,4}; int (*b)[4] = &a; int k = sizeof(a); printf("\n\n%d\n\n", k); printf("a = %u, b = %u, *b = %u, data = %d", a, b, *b, **b); return 0; } I got the following output
a = 3485401628, b = 3485401628, *b = 3485401628, data = 1 Here I am assigning the address of a to b, as the type of b is int**, but in the output I am getting that the address pointed by the a is the same as the address pointed by b.
It seems little confusing to me. What is the explanation?
&a