Cpp Inheritance MCQs

1.
When the inheritance is private, the private methods in base class are __________ in the derived class (in C++).

A. Inaccessible
B. Accessible
C. Protected
D. Public

2.
Accessing functions from multiple classes to a derived class is known as

A. multiple inheritance
B. single inheritance
C. Hybrid inheritance
D. multilevel inheritance


3.
What is meant by multiple inheritance?

A. Deriving a base class from derived class
B. Deriving a derived class from base class
C. Deriving a derived class from more than one base class
D. None of the mentioned

4.
What will be the order of execution of base class constructors in the following method of inheritance.class a: public b, public c {…};

A. b(); c(); a();
B. c(); b(); a();
C. a(); b(); c();
D. b(); a(); c();


5.
Inheritance allows in C++ Program?

A. Class Re-usability
B. Creating a hierarchy of classes
C. Extendibility
D. All of the above