为什么不是第二个输出打印200,200 ,301?
反而在第三个打印了是为什么?第二个不是有两个运算符吗,第三个没有运算符呀
#include <iostream>
using namespace std;
int main()
{
int* p;
int a[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
p = a;
cout << *p<<" "<<endl;
cout << *p <<" "<< * ++p << endl;
cout << *p <<" "<< * p++ << endl;
cout << *p<<" "<< * (p++) <<" " << endl;
cout << *p << " " << *++p << " " << *p++ << endl;
cout << *p << " " << *++p << " " << *p++ << " " << *(p)++ << endl;
cout << *++p <<" " << *p++ << endl;
cout<<*++p<<" "<< * (p)++ << endl;
cout<< *p++ <<" "<< * (p)++ << endl;
cout << * ++p << " "<< * p++ <<" "<< * (p)++ << endl;
}