R
Ramkey
I was asked in a test
class A{
A ~A{
cout << "A's destructor";
}
};
int main(void){
A Aobj;
Aobj.~A;
}
What will be the output?
I wrote "A's destructor";
I think it may also be "A's destructor" "A's destructor
twice).I
didnt run the program.What will be the output and why?
Thanks
class A{
A ~A{
cout << "A's destructor";
}
};
int main(void){
A Aobj;
Aobj.~A;
}
What will be the output?
I wrote "A's destructor";
I think it may also be "A's destructor" "A's destructor
didnt run the program.What will be the output and why?
Thanks