Consider the following struct declarations:

Q

Consider the following struct declarations:

struct A { A(){ cout << "A"; } };
struct B { B(){ cout << "B"; } };
struct C { C(){ cout << "C"; } };
struct D { D(){ cout << "D"; } };
struct E : D { E(){ cout << "E"; } };
struct F : A, B
{
C c;
D d;
E e;
F() : B(), A(),d(),c(),e() { cout << "F"; }
};

What constructors will be called when an instance of F is initialized? Produce the program output when this happens.

✍: Guest

A
(This question has not been answered yet. If you know the answer, please share it in a comment below.)

2012-05-09, 3395👍, 0💬