access to an array of pointers in c
<p>Why can I access an array of pointers with two parameters, when it's defined as one-dimensional?</p>

<p>I know, I have to work with an array of pointers to access a multi-dimensional array in a function, but I don't know why I can access the array of pointers with two parameters.</p>

<pre><code>int a[m][l] { 1,2,3,4, 2,3,4,5, 3,4,5,6  }; //some matrices
int c[m][l];    
int *ap[m];  //array of pointers one-dimensional
int i,j;


for (i = 0; i &lt; m; i++)  //passing the address of first element in each 
        ap[i] = a[i];    //colon of matrix to array of pointers

for (j = 0; j &lt; m; j++)
        bp[i] = b[i];

dosomethingwithmatrix(ap[0], bp[0], m, l);



int* dosomethingwithmatrix(const int*ap[], int* bp[])
{
            cp[i][j] = ap[i][j] //accss the array of pointers with two parameters

}
</code></pre>