#include <iostream>
using namespace std;
int main() {
int x = 1;
int y = 2;
int* p;
cout << "&x is: " << &x << endl;
cout << "&y is: " << &y << endl << endl;
p = &x;
cout << "p is: " << p << endl;
cout << "&x is: " << &x << endl;
cout << "&y is: " << &y << endl;
cout << "*p is: " << *p << endl;
cout << "x is: " << x << endl;
cout << "y is: " << y << endl << endl;
p = &y;
cout << "p is: " << p << endl;
cout << "&x is: " << &x << endl;
cout << "&y is: " << &y << endl;
cout << "*p is: " << *p << endl;
cout << "x is: " << x << endl;
cout << "y is: " << y << endl << endl;
*p = x;
cout << "p is: " << p << endl;
cout << "&x is: " << &x << endl;
cout << "&y is: " << &y << endl;
cout << "*p is: " << *p << endl;
cout << "x is: " << x << endl;
cout << "y is: " << y << endl << endl;
return 0;
}
// p is: 0x7ffdbae3a564
// *p is: 2
// x is: 1