Live quiz

cpp - Part 107

Question 1 of 11 Hints left: 3
Q1

What will be the output of the following C++ code? #include <iostream> #include <string> #include <cstdlib> using namespace std; template<class T> class A { public: A(){ cout<<"Created\n"; } ~A(){ cout<<"Destroyed\n"; } }; int main(int argc, char const *argv[]) { A <int>a1; A <char>a2; A <float>a3; return 0; }

  • A
  • B
  • C
  • D