#include <stdio.h> #include <stdlib.h> int main() { int r = 3, c = 4, i, j, count; int **arr; for (i=0; i<r; i++) // Note that arr[i][j] is same as *(*(arr+i)+j) count = 0; for (i = 0; i < r; i++) for (j = 0; j < c; j++) arr[i][j] = ++count; // OR *(*(arr+i)+j) = ++count for (i = 0; i < r; i++) for (j = 0; j < c; j++) /* Code for further processing and free the dynamically allocated memory */ return 0; }