#include<iostream>
using namespace std;
int main()
{
int a[10],i;
int *p=&a[0];//*p=a也可以a代表a[0]的地址
for(i=0;i<10;i++)
{
cin>>a[i];
}
cout<<"反向输出:";
for(i=9;i>=0;i--)
{
cout<<" "<<*(p+i)<<" ";// no *(a+i) a是数组首地址是常量不能改变
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: