Pointers and Multidimensional Array
The equivalence
*(p+k) ? p[k]
applies also for multidimensional array. Thus we have
**q ? *q[0]? q[0][0]
q[i][j] ? *(q[i]+j) ? *(*(q+i)+j)
In particular, if we declare
int q[5][5];
Then q is a pointer to pointer to int value.
Previous slide
Next slide
Back to first slide
View graphic version