What is difference between array of pointers and pointer to an array?
Array of pointers means an array who content are pointers i.e. address of any type of variable. For example:
int * arr; //arr is an array which can hold address of five int variables.
float **arr; //arrr is an array which can hold the address of address of ten float variables.
//Program for array of pointers:
static int i=5,j=10,k=15,l=20;
While pointer to an array is a pointer which can hold the address of any array. For example:
int (*ptr); //ptr is pointer to such array which size is five and content is int type data.
//Program for pointer to an array: