说明:图片为程序运行结果,仅供参考。如有疑问请联系,谢谢
一、*(p++)与*p++相同
#include "iostream"using namespace std;
int main()
{
int a[5]={1,4,3,2,5},*p;
p=a;
cout<<"首地址是"<<p<<endl;
cout<<"第一个是:"<<*p<<endl;
cout<<"*(p++)对应输出为:"<<*(p++)<<endl;
cout<<"之后的p是:"<<p<<endl;
cout<<"对应的*p是:"<<*p<<endl;
cout<<"over";
return 0;
}

二、*(++p)与*++p相同
#include "iostream"using namespace std;
int main()
{
int a[5]={1,4,3,2,5},*p;
p=a;
cout<<"首地址是"<<p<<endl;
cout<<"第一个是:"<<*p<<endl;