include
using namespace std;
int main(){
int a=10;
//声明指针p
int p;
//将指针p指向变量a的内存地址
p=&a;
cout<<"a的值="<<a<<endl;
cout<<"a的内存地址="<<p<<endl;
cout<<"指针p的指向内存地址的值"<<p<<endl;
return 0;
}
using namespace std;
int main(){
int a=10;
//声明指针p
int p;
//将指针p指向变量a的内存地址
p=&a;
cout<<"a的值="<<a<<endl;
cout<<"a的内存地址="<<p<<endl;
cout<<"指针p的指向内存地址的值"<<p<<endl;
return 0;
}