I saw this example when I was trying to figure out how to pass pointers to dynamically allocated 2d arrays to functions:
void zeroit(int **array, int nrows, int ncolumns)
{
int i, j;
for(i = 0; i < nrows; i++)
{
for(j = 0; j < ncolumns; j++)
array[i][j] = 0;
}
}
I tried it and it works, but I don't understand how. How does the function "zeroit" calculates the correct address?