int val = 7;
int *ptr = &val;
val is a variable of type int and ptr is a pointer to type int so the assignment above is right and there is no warning from compiler.
int val[5] = {5, 3, 2, 33,557};
int (*ptr)[1]=&val;
val is an array of integers and ptr is a pointer to an array of int when run compiler give me a warning:
warning: initialization from incompatible pointer type [enabled by default]
please someone explain me what is the differece between them?