int (*p)[4] , *ptr;
int a[4] = {10,20,30,40};
printf(\"%p\\n%p\\n%p\",&a,a,&a[0]);
p = &a ;
//p=a; gives error
//ptr = &a; gives error
ptr
p is a pointer to values of type int[4], i.e. a pointer to arrays of 4 integers each. Note that sizeof(*p) is 4 times sizeof(int).
Now,
p = a fails because a decays to a pointer-to-int when assigned, while p points to a different type. Read more about decaying: What is array to pointer decay?ptr = &a fails because ptr is actually a pointer-to-int; it doesn't have the same type as p. Declaring multiple variables on the same line is often confusing, because not all syntax applies to everything you declare; better split up those definitions to separate lines.