Vidyalelo
C++ Programming · Q480

C++ miscellaneous

Programming · C++ Programming · question 480

Q480

What will be the output of the following C++ code? #include #include #include using namespace std; template class A public: A() cout<<"Created "; ~A() cout<<"Destroyed "; ; int main(int argc, char const *argv[]) A a; return 0;

A.
Created
Destroyed
B.
Destroyed
Created
C.
Compile-time error
Answer
D.
Run-time error

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board