I was wondering something about the multidimensional arrays and then I got a doubt about a concept, specifically about their representation on memory.
For example, an array can be defined as follows.
int a[3];
And this is represented as this.
Where each element is an int and all of them are in a continuous memory space.
Then a multidimensional array can be define as this.
int a[2][4];
Which is typically represented as.
But a more realistic representation of this array in memory wouldn't be something like this? (by analogy with the first image).
Because I was thinking that if, for example, int a[5];
defines 5 integers in a space of continuous memory, then int a[5][10];
defines 10 arrays of ints in a space of continuous memory, where each array define 5 integers, then any N-dimensional static array in C should be represented only as a strip of memory.