Inheritance – MCQs July 22, 2025 by u930973931_answers 30 Score: 0 Attempted: 0/30 Subscribe 1. : What is inheritance in C++? (A) Reusing variables only (B) Reusing functions only (C) Reusing classes and their properties (D) None of the above 2. : Which keyword is used to inherit a class in C++? (A) extends (B) inherits (C) base (D) public/private/protected 3. : Which type of inheritance involves a derived class from more than one base class? (A) Single (B) Multiple (C) Hierarchical (D) Hybrid 4. : Which type of inheritance has one base class and many derived classes? (A) Hybrid (B) Multiple (C) Hierarchical (D) Multilevel 5. : In C++, which access specifier allows derived classes to access base class members? (A) private (B) protected (C) public (D) static 6. : What is multilevel inheritance? (A) One class inherits from two or more classes (B) A class is inherited by another derived class (C) All classes are abstract (D) None of the above 7. : Which access mode allows maximum access from derived class? (A) private (B) protected (C) public (D) none 8. : What is the default inheritance mode in C++ classes? (A) public (B) private (C) protected (D) virtual 9. : Which member of a base class is not inherited? (A) public members (B) protected members (C) constructors (D) all are inherited 10. : Inheritance promotes which of the following? (A) Redundancy (B) Reusability (C) Complexity (D) Encapsulation only 11. : What happens when a derived class object is created? (A) Only derived class constructor is called (B) Only base class constructor is called (C) Both base and derived class constructors are called (D) None are called 12. : Which function is not inherited from base class? (A) Destructor (B) Constructor (C) Static function (D) Friend function 13. : What is hybrid inheritance? (A) Combination of single and multilevel inheritance (B) Combination of multiple and multilevel inheritance (C) Combination of all types (D) Inheritance with arrays 14. : Which inheritance can cause ambiguity in method calling? (A) Multiple (B) Single (C) Multilevel (D) Hierarchical 15. : Which technique solves the ambiguity in multiple inheritance? (A) Polymorphism (B) Encapsulation (C) Virtual inheritance (D) Static function 16. : A derived class object can access which members of the base class? (A) private only (B) public and protected (C) protected only (D) all members 17. : What is the base class in inheritance? (A) The class being derived (B) The class from which others are derived (C) The last class in chain (D) None 18. : Can private members of the base class be accessed directly in derived class? (A) Yes (B) No (C) Only in public inheritance (D) Only in protected inheritance 19. : Which type of inheritance is used when a class is derived from two classes, and one of them is also derived from another class? (A) Multilevel (B) Hybrid (C) Multiple (D) Hierarchical 20. : Which member of the base class is inherited but cannot be accessed directly? (A) public (B) protected (C) private (D) static 21. : Which of the following is NOT an advantage of inheritance? (A) Code Reusability (B) Reduced redundancy (C) Increased performance (D) Improved data security 22. : What do we call a class that is used only as a base class and not to create objects? (A) Parent class (B) Abstract class (C) Interface (D) Template class 23. : Can a class be derived from more than one base class in C++? (A) Yes (B) No (C) Only if all are public (D) Only if virtual 24. : When is ambiguity resolved in multiple inheritance? (A) During runtime (B) During compile-time (C) During linking (D) Not possible 25. : Which type of inheritance may cause Diamond Problem? (A) Single (B) Multiple (C) Multilevel (D) Hybrid 26. : Which inheritance requires virtual keyword to avoid ambiguity? (A) Hybrid (B) Multiple (C) Single (D) None 27. : What is the role of the scope resolution operator (::) in inheritance? (A) It accesses private members (B) It resolves ambiguity (C) It deletes base class (D) It restricts access 28. : Can destructors be inherited in C++? (A) Yes (B) No (C) Only if virtual (D) Only in public inheritance 29. : Can we override base class functions in derived class? (A) No (B) Yes, if they are virtual (C) Only public ones (D) Only constructors 30. : What does “is-a” relationship indicate in OOP? (A) Composition (B) Inheritance (C) Abstraction (D) Overloading