This question is compilable and deterministic.
Its output is “abBA”.
The base class constructor is called before the inherited constructor. The inherited destructor is called before the base class destructor.
SOURCE