C examples for Array:Multidimensional Arrays
Retrieve Data from a Two-Dimensional Array uses pointer
#include <stdio.h> int main()//from www . ja v a2 s . co m { int num[3][2] = { {1, 4}, {2, 5}, {3, 6} }; int (*ptrArray) [2]; int *ptrInt; for(int row = 0; row < 3; row++){ ptrArray = &num[row]; ptrInt = (int *) ptrArray; for(int col = 0; col < 2; col++) printf("%d ", *(ptrInt + col)); printf("\n"); } return(0); }