#include <iostream>
int main() {
int matrix[3][4] = {
{2, 0, 5, 0},
{0, 4, 0, 1},
{7, 8, 0, 9}
};
int rows = sizeof matrix / sizeof matrix[0];
int cols = sizeof matrix[0] / sizeof(int);
std::cout << "rows: " << rows << "\n";
std::cout << "cols: " << cols << "\n";
}
/*
run:
rows: 3
cols: 4
*/