#include <stdio.h>
int main()
{
int matrix[][4] = { { 1, 1, 1, 1 }, { 2, 2, 2, 2 }, { 3, 3, 3, 3 } };
int rows = sizeof(matrix) / sizeof(matrix[0]);
int cols = sizeof(matrix[0]) / sizeof(matrix[0][0]);
printf("rows = %d\n", rows);
printf("cols = %d\n", cols);
printf("total cells = %d\n", rows * cols);
return 0;
}
/*
run:
rows = 3
cols = 4
total cells = 12
*/