From my lecture slides, it states:
As illustrated in the code below an array name can be assigned
to an appropriate pointer without the need for a preceding & operator.
int x;
int a[3] = {0,1,2};
int *pa = a;
x = *pa;
x = *(pa + 1);
x = *(pa + 2);
a += 2; /* invalid */
Why is a += 2;
invalid?
Can anyone help clarify?
Also feel free to edit the title if you think of a better one.