Please consider the following code:
#include
#include
#define NUM_ARRAYS 4
#define NUM_ELEMENTS 4
#define INVALID_VAL
*ptr + 1 is address of ptr[0][1]
Because, we know
ptr[0][1] == *(*(ptr+0)+1)
Now putting ampersand on both side
&ptr[0][1] == &*(*(ptr+0)+1)
You know that ampersand with asterisk is like plus sign with minus sign? They get cancelled. So this becomes
&ptr[0][1] == (*(ptr+0)+1)
Which is same as
&ptr[0][1] == *(ptr+0)+1
Which is again same as
&ptr[0][1] == *ptr+1
This is my first statement.