class A {
public:
int *p;
A() {
p = newint[5];
for(int i = 0; i < 5; i++)
p[i] = 0;
}
~A(){ delete [] p; p = NULL;}
};
void display(A obj) {
for(int i = 0; i < 5; i++)
cout<<"value is"<<obj.p[i]<<endl;
}
int main() {
A a1; display(a1);
display(a1);
}