#include void show(int **gp, size_t rows, size_t cols) { for (size_t r = 0; r < rows; ++r) { for (size_t c = 0; c < cols; ++c) { printf("%d", gp[r][c]); } putchar('\n'); } } int main(int argc, char *argv[]) { int grid[3][3] = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9}, }; show((int **)grid, 3, 3); }