int main() { int x[3]={4,5,6}; int *p=x; p +1=p;/*compiler shows error saying lvalue required as left operand of assignment*/
To assign, you should use p=p+1; instead of p+1=p;
p=p+1;
p+1=p;
int main() { int x[3]={4,5,6}; int *p=x; p=p+1; /*You just needed to switch the terms around*/ cout<