#include <iostream>
using namespace std;
int main()
{
int i = 5;
int* p;
cout << "pointer p is " << *p << " at " << (void*)&p << " and size is " << sizeof(p) << endl;
p = new int;
//*p = 10;
cout << "pointer p is " << *p << " at " << (void*)&p << " and size is " << sizeof(p) << endl;
delete p;
p = &i;
cout << "pointer p is " << *p << " at " << (void*)&p << " and size is " << sizeof(p) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkKewogICAgaW50IGkgPSA1OwogICAgaW50KiBwOwogICAgY291dCA8PCAicG9pbnRlciBwIGlzICIgPDwgKnAgPDwgIiBhdCAiIDw8ICh2b2lkKikmcCA8PCAiIGFuZCBzaXplIGlzICIgPDwgc2l6ZW9mKHApIDw8IGVuZGw7CiAgICBwID0gbmV3IGludDsKICAgIC8vKnAgPSAxMDsKICAgIGNvdXQgPDwgInBvaW50ZXIgcCBpcyAiIDw8ICpwIDw8ICIgYXQgIiA8PCAodm9pZCopJnAgPDwgIiBhbmQgc2l6ZSBpcyAiIDw8IHNpemVvZihwKSA8PCBlbmRsOwogICAgZGVsZXRlIHA7CgogICAgcCA9ICZpOwogICAgY291dCA8PCAicG9pbnRlciBwIGlzICIgPDwgKnAgPDwgIiBhdCAiIDw8ICh2b2lkKikmcCA8PCAiIGFuZCBzaXplIGlzICIgPDwgc2l6ZW9mKHApIDw8IGVuZGw7CgogICAgcmV0dXJuIDA7Cn0=