The question was "what is the general expression?"
For an n-dimensional array of elements 'type'
the declaration might be:
"type name[m1][m2][m3][ . . . ][mn];"
where "type" is int, char, etc;
"name" is the array name;
"m1", "m2" etc are the sizes of each subscript.
The address of an element (&name[M1][M2][. . . ][MN]) = (type *)name + MN * (sizeof(type) + M(N-1) * (sizeof(type) + . . . . +M1 * (sizeof(type)))))))); (N closing paren)
However, I could have it backwards, in which case, run the N -> 0 indices back the other way. Draw a sketch on a piece of paper, with the last subscript of the array changing fastest, and you should see it.
tony