I create a 2D array in C as follows:
int **arr;
arr = malloc(rows * sizeof(int *));
for (i = 0; i < rows; i++)
arr[i] = malloc(cols * sizeof(int));
Now, I call:
func(arr)
In the function func
, how do I calculate the row and column dimensions?