Q:

C programming. Array of pointers, and pointer to an array

Why I'm getting compiling error in following code? and What is the difference between int (*p)[4], int *p[4], and int *(p)[4]? 
#include <stdio.h>
int main(){
   int (*p)[4];// what is the difference between int (*p)[4],int *p[4], and int *(p)[4]
   int x=0;
   int y=1;
   int z=2;
   p[0]=&x;
   p[1]=&y;
   p[2]=&z;
   for(int i=0;i<3;++i){
      printf("%i\n",*p[i]);
   }
   return 0;
}

A:

There is no difference between 
int *p[4];

and
int *(p)[4];

Both declare p to be an array of 4 pointers.
int x;
p[0] = &x;

is valid for both.
int (*p)[4];

declares p to be a pointer to an array of 4 ints.
You can get more details on the difference between
int *p[4];
int (*p)[4];

at C pointer to array/array of pointers disambiguation.

