Take a look at this piece of code
int a[4] = { 1, 2, 3, 4 } // array
int(*b) = a // pointer to the first element of the array
You should know that int(*b) is equal to int(*b)[0] and a[0].
Therefore, It's a pointer pointing to an integer(int*), not a pointer pointing to an array of integer.
That how type issue arises in your case.
Noted that C is a strong type language. Look at your assignment statement.
int(*b)[4] = &a;
It takes a parameter of int(*ptr)[4]. It means you have to strictly pass the argument of that type, which is a int *.
And you are trying to pass a pointer to array of 4 int to int * . Therefore, they're not compatible in the assignment, even their address are the same.
int x; double *p = &x;doesn't work.struct S { int x; } s;. Then&sand&s.xare the same numerical address. So, what is&sthen: adress of the entire struct object or address of its first field?&a[0]the same as(char*)&a[0]?