fbpx

C++ Interview Question 5 Answer

Bjarne-stroustrup
 

Answer

This question is compilable and deterministic.

Its output is “BA”.

Explanation

The initialization order of member variables is determined by their order of declaration, not their order in the initialization list.

SOURCE