146. Inheritance

Question.3

A Derived class inherits from a Base class:

class Base {
public:
   Base() { printf("B"); }
};
class Derived : public Base {
public:
   Derived() { printf("D"); }
};

Derived d;

What is the output?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!