int array[2][5]; int rows; int cols; cols = sizeof(array[0]) / sizeof(int); rows = (sizeof(array) / sizeof(int))/cols; printf("rows: %d ",rows); printf("cols: %d",cols);