Below program (a toy program to pass around arrays to a function) doesn\'t compile. Please explain me, why is the compiler unable to compile(either because of techni
This (as usual) is explained in the c faq. In a nutshell, an array decays to a pointer only once (after it decayed, the resulting pointer won't further decay).
An array of arrays (i.e. a two-dimensional array in C) decays into a pointer to an array, not a pointer to a pointer.
Easiest way to solve it:
int **array; /* and then malloc */