Given this problem and I'm fully aware of the facts of :
1) The name of an array is a fixed pointer to the first element of it.
2) The name of a 2D matrix is the address of the first 1D array of it.
3) and the difference between x[i] and &x[i] in arithmetic operations (where i is a non negative integer).
The compiler is MinGW How can the compiler in C get the difference between the address of the first element of the array and the address of the whole array although they hold the same numeric value ?
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int main(void)
{
int x[3][3] = {1,2,3,4,5,6,7,8,9} ;
int *p ;
for(p = &x[0] ; p < &x[0] + 1 ; p++) //Warning: comparison of distinct pointer types in this line of code
printf("%d\n",*p) ;
return 0 ;
}