Mon Aug 30 10:48:25 CEST 2010
Constant multidimensional arrays
One of those things that has always puzzled me is how multidimensional
arrays work in C. I've always avoided this and embedded multidim
arrays inside of 1-dim arrays using explicit coordinate mapping.
In the definition of `temp`, is there an array of pointers involved?
K&R: "In C, a two-dimentional array is really a one-dimensional
array, each of whose elements is an array.".
So my confusion is mostly about the difference between an array and a
pointer. These are not the same! See the sizeof() macro.
The confuses arrises because an array is automatically converted to a
pointer whenever it is used in a pointer context.