I have the following C program:
#include int main(){ int a[2][2] = {1, 2, 3, 4}; printf(\"a:%p, &a:%p, *a:%p \\n\", a, &a, *
You know that a is the address of the first element of your array and according to the C standard, a[X] is equal to *(a + X).
a
a[X]
*(a + X)
So:
&a[0] == a because &a[0] is the same as &(*(a + 0)) = &(*a) = a.
&a[0] == a
&a[0]
&(*(a + 0))
&(*a)
&a[0][0] == a because &a[0][0] is the same as &(*(*(a + 0) + 0))) = &(*a) = a
&a[0][0] == a
&a[0][0]
&(*(*(a + 0) + 0)))