#include #include int main(void) { size_t row = 3; size_t col = 3; int **array = malloc(row * sizeof(int *)); // allocate memory for the two dimensional array for(int i = 0; i < row; i++) *(array + i) = malloc(col * sizeof(int)); // fill the two dimensional array with values for(int i = 0; i < row; i++) for(int j = 0; j < col; j++) *(*(array + i) + j) = i; // print out the two dimensional array for(int i = 0; i < row; i++) for(int j = 0; j < col; j++) { if(j % col == 0) printf("\n\t"); printf("[%d]", *(*(array + i) + j)); } printf("\n\n"); return 0; }