#define N 8
typedef int fix_matrix[N][N];
fix_matrix A; //declare A as a two-dimension array
when we create array of arrays,the declaration
int A[8][8]
is equivalent to the declaration:
typeof int row_t[8];<span style="white-space:pre"> </span>//regard int[8](32bytes) as a new type
row_t A[8];<span style="white-space:pre"> </span>//create a array of type "row_t"
<span style="white-space:pre"> </span>printf("size of A is %d\n",sizeof(A)); //8bytes
printf("size of A[0] is %d\n",sizeof(A[0])); //32bytes
printf("size of A[0][0] is %d\n",sizeof(A[0][0])); //4bytes
printf("size of int is %d\n",sizeof(int)); //4bytes
printf("size of int* is %d\n",sizeof(int *)); //8bytes
A is a const pointer which stores the start addr of array row_t[8].
A[0] is a row_t, whose size is 32 bytes.
A[0][0] is int whose size is 4 bytes