While initializing the pointer p
in the given statement
int a[10], *p;
p = &a[0];
I am in doubt that whether the type of &a[0]
is pointer to int
or is it int
?
I came to this confusion after reading this:
Using
a
as a pointer to the first element in the array, we can modify a[0]:*a = 7;
.
NOTE: I am interested to know the type of &a[0]
.