When you use name of the array is any expression except &array
and sizeof array
this name will be automaticly converted to pointer to the first element of the array (char [5][10]
will be converted to char (*)[10]
). Address of this pointer will be equal to the adress of entire array.
So, "sizeof (char [5][10]) == 50", there is no additional pointers.
char arr[5][10];
&a = 3473104 // Address of entire array, (char (*)[5][10])
&a[0] = 3473104 // Address of first row, (char (*)[10])
&a[0][0] = 3473104 // Address of first char, (char *)
a = 3473104 // "a", (char [5][10]), converted to "&a[0]", (char (*)[10])
a[0] = 3473104 // "a[0]", (char[10]), converted ro "&a[0][0]", (char *)