Đặng Thị Mỹ Linh
New member
What will be the output of the following C++ code?
A. Destructor called
B. Nothing will be printed
C. Error
D. Segmentation fault
Code:
#include<iostream>
using namespace std;
class A
{
~A(){
cout<<"Destructor called\n";
}
};
int main()
{
A a;
return 0;
}
B. Nothing will be printed
C. Error
D. Segmentation fault