#include <iostream>
using namespace std;
int main() {
// your code goes here
int* a;
a=new int[10];
for (int i=0; i<10;i++)
a[i]=i+1;
cout<<"Before Deallocation"<<endl;
for (int i=0; i<10;i++)
cout<<a[i]<<endl;
delete [] a;
cout<<"After Deallocation"<<endl;
for (int i=0; i<10;i++)
cout<<a[i]<<endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglpbnQqIGE7CglhPW5ldyBpbnRbMTBdOwoJZm9yIChpbnQgaT0wOyBpPDEwO2krKykKCSBhW2ldPWkrMTsKCSBjb3V0PDwiQmVmb3JlIERlYWxsb2NhdGlvbiI8PGVuZGw7CgkgCgkgZm9yIChpbnQgaT0wOyBpPDEwO2krKykKCSAgY291dDw8YVtpXTw8ZW5kbDsKCSAgCgkgIGRlbGV0ZSBbXSBhOwoJICAKCSAgY291dDw8IkFmdGVyIERlYWxsb2NhdGlvbiI8PGVuZGw7CgkgIAoJICBmb3IgKGludCBpPTA7IGk8MTA7aSsrKQoJICBjb3V0PDxhW2ldPDxlbmRsOwoJICAKCXJldHVybiAwOwp9