Two-Dimensional arrays and pointers : Pointer Array « Pointer « C / ANSI-C

Two-Dimensional arrays and pointers

#include <stdio.h>

void main()
   char twoD[3][3] = { {'1','2','3'},

   printf("address of twoD        : %p\n", twoD);
   printf("address of twoD[0][0]  : %p\n", &twoD[0][0]);
   printf("but what is in twoD[0] : %p\n", twoD[0]);


Related examples in the same category

1.Arrays and pointersArrays and pointers
2.Arrays and pointers taken furtherArrays and pointers taken further
3.Arrays and pointers: char arrayArrays and pointers: char array
4.Arrays and pointers: char array indexArrays and pointers: char array index
5.Declare a pointer to an array that has 10 ints in each row: allocate memory to hold a 4 x 10 array