Having the following class definition inside the function, what will be printed by the following code?
#include <iostream>

int main() {
  typedef class A {
  public:
    A() { std::cout << "A()"; }
    ~A() { std::cout << "~A()"; }
  } a;
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
C++ quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes