int a[3]={10,20,30};
int* p = a;
cout << *p++ << endl;
According to wikipedia, suffix ++
has higher precedence than dereference, *p++
should run p++
first and then dereference and the result should be 20, but why the actual result is 10?
int a[3]={10,20,30};
int* p = a;
cout << *p++ << endl;
According to wikipedia, suffix ++
has higher precedence than dereference, *p++
should run p++
first and then dereference and the result should be 20, but why the actual result is 10?