For any array or pointer a
and index i
, the expression a[i]
is exactly equal to *(a + i)
. From that we can draw the conclusion that a + i
is a pointer which is equal to &a[i]
.
So when you try to do &(a + 1)
that’s really equal to &&a[1]
which makes no sense and gives you an error.
solved while trying to print the address of a[1] error: lvalue required as unary ‘&’ operand pops up