void print_arr(int** a, unsigned int nrows, unsigned int ncols) { unsigned int r, c; for (r = 0; r < nrows; r++) { for (c = 0; c < ncols; c++) { printf("%d ", a[r][c]); } printf("\n"); } }