The first declaration is commonly referred to as an array of pointers. Does the second declaration have a name or description that distinguishes it from the first declaration?
Declaration 1: int *p[SIZE]
Declaration 2: int (*p)[SIZE]
The first declaration is commonly referred to as an array of pointers. Does the second declaration have a name or description that distinguishes it from the first declaration?
Declaration 1: int *p[SIZE]
Declaration 2: int (*p)[SIZE]
int *p[SIZE]
This is to declare array of SIZE
number of pointers to int
Whereas , this -
int (*p)[SIZE]
declare p
as pointer to array of int (having SIZE
number of elements)
p is array of int pointers.
int *p[SIZE]
p is pointer to an array of integers
int (*p)[SIZE]
Edit
The second kind of declaration is mentioned in 5.12 Complicated Declarations The C programming Language book. Here is some reference which explains complicated declarations