Home > Object Oriented Programming > Quizzes > Object Oriented Programming Practice Test: Inheritance & its Types
Object Oriented Programming Practice Test: Inheritance & its Types
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 0% Most missed: “How many classes can be derived from the base class using hierarchical inheritan…”
Quiz on inheritance and its types, single and multilevel inheritance, multiple inheritance, hierarchical and hybrid inheritance.   Inheritance is a feature in Object-Oriented Programming (OOP) that allows a class to inherit properties and characteristics from another class. It is a fundamental concept in OOP that promotes code reuse and establishes relationships between classes.  Here are some types of inheritance: Single inheritance: When a derived class inherits only from one base class. For example, the Student class inherits properties from the Person class. Multilevel inheritance: A... Show more
Object Oriented Programming Practice Test: Inheritance & its Types
Time left 00:00
25 Questions

1. If multi-level inheritance is used, First class B inherits class A, then C inherits B and so on. Till how many classes can this go on?
2. Members which are not intended to be inherited are declared as ________________
3. Which among the following is false?
4. How many abstract classes can be used in multilevel inheritance?
5. Which type of inheritance results in the diamond problem?
6. If base class contains 2 nested classes, will it be possible to implement single level inheritance?
7. If __________________ inheritance is done continuously, it is similar to tree structure.
8. Which is the correct syntax of inheritance?
9. 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?
10. Which Class is having highest degree of abstraction in multilevel inheritance of 5 levels?
11. If a base class is inherited in protected access mode then which among the following is true?
12. Diamond problem includes ____________________ hybrid inheritance.
13. Which concept will result in derived class with more features (consider maximum 3 classes)?
14. Which among the following best defines multilevel inheritance?
15. Is it compulsory for all the classes in multilevel inheritance to have constructors defined explicitly if only last derived class object is created?
16. Which class constructor is called first when an object of derived class is created?
17. How many types of inheritance are possible in C++?
18. Is it possible to have all the abstract classes as base classes of a derived class from those?
19. If class A has two nested classes B and C. Class D has one nested class E, and have inherited class A. If E inherits B and C, then ________________
20. Which among the following is best to define hierarchical inheritance?
21. Which problem arises due to multiple inheritance, if hierarchical inheritance is used previously for its base classes?
22. All the classes must have all the members declared private to implement multilevel inheritance.
23. Which among the following best describes multiple inheritance?
24. If class A inherits class B and class C as “class A: public class B, public class C {// class body ;}; ”, which class constructor will be called first?
25. How many base classes can a derived class have which is implementing multiple inheritance?