Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyC++constructors and destructorsSingle-choice MCQ

What is the output?

struct A { ~A() { std::cout << "A "; } }; struct B { ~B() { std::cout << "B "; } }; int main() { A a; B b; }