#include <iostream>
#define COLS 4
void print_column(int matrix[][COLS], int rows, int col) {
for (int i = 0; i < rows; i++) {
std::cout << matrix[i][col] << " ";
}
}
int main()
{
int matrix[][COLS] = {
{3, 2, 5, 1},
{4, 7, 6, 5},
{9, 3, 0, 1}
};
int rows = sizeof(matrix) / sizeof(matrix[0]);
print_column(matrix, rows, 1);
}
/*
run:
2 7 3
*/