C - Pointers Vs Multidimensional Arrays
From EdWiki
Pointers Vs Multidimensional Arrays
int ar[10][20]; // two-dim array int* ap[10]; // array of pointers to ints
- ar is a true two-dimensional array.
- For ap, however, the definition only allocates 10 pointers and doesn’t initialize them.
- The advantage of the pointer array is that the rows of the array may be of different lengths.