#include <stdio.h>
#include <stdlib.h>
int array[4][5] = {
{'p', 'i', 'c', '1', '6'},
{'p', 'i', 'c', '1', '8'},
{'p', 'i', 'c', '2', '4'},
{'d', 's', 'p', 'i', 'c'}
};
int len;
int rows, column;
int *begin = array; // get the begin address of array
int *end = *(&array + 1); // get the address after array last address
int x, y;
int main(void)
{
len = end - begin; // calculate total len
rows = *(&array+1)-array; // get the total values of row
column = *(&array[0]+1) - array[0]; // get the total values of column
printf("begin = %p\n", begin);
printf("end = %p\n", end);
printf("len = %d\n", len);
printf("rows = %d\n", rows);
printf("column = %d\n", column);
for(y = 0; y < rows; y++)
{
for(x = 0; x < column; x++)
{
printf("array[%d][%d] = %c\n", y, x, array[y][x]);
}
printf("\n");
}
system("pause");
return 0;
}