#include <iostream>
using namespace std;
int main() {
// your code goes here
int* 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;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglpbnQqIGE9bmV3IGludFsxMF07Cglmb3IgKGludCBpPTA7IGk8MTA7aSsrKQoJIGFbaV09aSsxOwoJIGNvdXQ8PCJCZWZvcmUgRGVhbGxvY2F0aW9uIjw8ZW5kbDsKCSAKCSBmb3IgKGludCBpPTA7IGk8MTA7aSsrKQoJICBjb3V0PDxhW2ldPDxlbmRsOwoJICAKCSAgZGVsZXRlIFtdIGE7CgkgIAoJICBjb3V0PDwiQWZ0ZXIgRGVhbGxvY2F0aW9uIjw8ZW5kbDsKCSAgCgkgIGZvciAoaW50IGk9MDsgaTwxMDtpKyspCgkgIGNvdXQ8PGFbaV08PGVuZGw7CgkgIAoJcmV0dXJuIDA7Cn0=