fbpx

C++ Interview Question 15 Answer

Bjarne-stroustrup
 

Answer

This question is compilable and deterministic.

Its output is “abBA”.

Explanation

Member variables are initialized before the constructor is called. The destructor is called before member variables are destroyed.

SOURCE