Q65
What will be the output of the following C++ code? #include using namespace std; class Base public: Base ( ) cout << "1" << endl; ~Base ( ) cout << "2" << endl; ; class Derived : public Base public: Derived ( ) cout << "3" << endl; ~Derived ( ) cout << "4" << endl; ; int main( ) Derived x;
A.
1234
B.
4321
C.
1423
D.
1342
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board