Explore topic-wise MCQs in Object Oriented Programming Using C++.

This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming Using C++ knowledge and support exam preparation. Choose a topic below to get started.

1.

If object of lowest level class is created (last derived class) ________________ of its parent class constructors are called.

A. Few
B. All
C. Only parent and parent
D. Base and Derived
Answer» D. Base and Derived
2.

If hierarchical inheritance requires to inherit more than one class to single class, which syntax is correct? (A, B, C are class names)

A. hierarchical class A: public B, public C
B. multiple class A: public B, public C
C. many class A: public B, public C
D. class A: public B, public C
Answer» E.
3.

The private member s are made public to all the classes in inheritance.

A. True
B. False
Answer» C.
4.

Diamond problem includes ____________________ hybrid inheritance.

A. Hierarchical and Multiple
B. Hierarchical and Hierarchical
C. Multiple and Multilevel
D. Single, Hierarchical and Multiple
Answer» B. Hierarchical and Hierarchical
5.

If single inheritance is used with class A and B. A is base class. Then class C, D and E where C is base class and D is derived from C, then E is derived from D. Class C is made to inherit from class B. Which is the resultant type?

A. Single level
B. Multilevel
C. Hybrid
D. Multiple
Answer» C. Hybrid
6.

How many types of inheritance should be used for hybrid?

A. Only 1
B. At least 2
C. At most two
D. Always more than 2
Answer» C. At most two