I've read that array subscript access is the same as pointer subscript access (can't find the proper link, but http://c-faq.com/aryptr/joke.html mentions that indirectly).
So what about multidimensional access? Obviously there is no pointer at c[0] in a multidimensional array.
#include <stdio.h>
int main(){
char c[5][2][4];
c[1][1][2] = 'n';
printf("\n%c", c[1][1][2]);
char* ptr = c;
printf("\n%c\n", ptr[1*8+4*1+2]);
}
But whatever it references (in a 3D array [d1][d2][d3]) is of size d2*d3, as that is where the imaginary pointer is offset.
Are there any docs for how this is implemented or how this can be reasoned with? In the 2D case, it makes sense, that it is just a pointer, but for the 3+ case, it is not clear if/how pointers are still being worked with.