What will be the output?
#include <iostream>
class Test {
public:
~Test() {
std::cout << "Destructor called\n";
}
};
int main() {
Test t1;
}
No output
Destructor called
Compilation error
Runtime Error
This question is part of this quiz :
C++ Destructors,Constructors & Destructor,Constructors, Destructors, and this Pointer