Explanation:
A pointer which holds base address of an array or address of any element of an array is known as pointer to array. For example:
(a)
#include<stdio.h>
int main(){
int arr[5]={100,200,300};
int *ptr1=arr;
char *ptr2=(char *)arr;
printf("%d %d",*(ptr1+2),*(ptr2+4));
return 0;
}
Output: 300 44
(b)
#include<stdio.h>
int main(){
static int a=11,b=22,c=33;
int * arr[5]={&a,&b,&c};
int const * const *ptr=&arr[1];
--ptr;
printf("%d ",**ptr);
return 0;
}
Output: 11