#define ARRAY_SIZE 10
typedef int matrix_t[ARRAY_SIZE][ARRAY_SIZE];
matrix_t a;
printf("%d,%d,%d\n",sizeof(a),sizeof(matrix_t),sizeof(int));
If you run above code in IA32, you get result below:
400,400,4So, "typedef" can define type.
|
|
#define ARRAY_SIZE 10
typedef int matrix_t[ARRAY_SIZE][ARRAY_SIZE];
matrix_t a;
printf("%d,%d,%d\n",sizeof(a),sizeof(matrix_t),sizeof(int));
400,400,4So, "typedef" can define type.