I have an example involving a pointer to a 2D array. Can someone help me understand what is going on in this example?
int main()
{
int i = 0, j=0, sum0
In your example the loop goes through all matrix rows to find the one whose sum of all elements holds the maximum value.
At the beginning a pointer to the first row is assigned:
Ptr = *data;
Which means that the following is true:
(Ptr[0] == 23 && Ptr[1] == 55 && Ptr[2] == 50)
Notice that Ptr is a pointer so it holds a memory address, hence Ptr is different than 23 (unless the memory address happens to be 23, which is unlikely to happen).