Getting the values in a two-dimensional array
#include <stdio.h>
void main()
{
int i = 0; /* Loop counter */
char t[3][3] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'}
};
/* List all elements of the array */
for(i = 0; i < 9; i++)
printf(" t: %c\n", *(*t + i));
}
Related examples in the same category