Inheritance – MCQs

30 Score: 0 Attempted: 0/30 Subscribe
1. : What is inheritance in C++?





2. : Which keyword is used to inherit a class in C++?





3. : Which type of inheritance involves a derived class from more than one base class?





4. : Which type of inheritance has one base class and many derived classes?





5. : In C++, which access specifier allows derived classes to access base class members?





6. : What is multilevel inheritance?





7. : Which access mode allows maximum access from derived class?





8. : What is the default inheritance mode in C++ classes?





9. : Which member of a base class is not inherited?





10. : Inheritance promotes which of the following?





11. : What happens when a derived class object is created?





12. : Which function is not inherited from base class?





13. : What is hybrid inheritance?





14. : Which inheritance can cause ambiguity in method calling?





15. : Which technique solves the ambiguity in multiple inheritance?





16. : A derived class object can access which members of the base class?





17. : What is the base class in inheritance?





18. : Can private members of the base class be accessed directly in derived class?





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?





20. : Which member of the base class is inherited but cannot be accessed directly?





21. : Which of the following is NOT an advantage of inheritance?





22. : What do we call a class that is used only as a base class and not to create objects?





23. : Can a class be derived from more than one base class in C++?





24. : When is ambiguity resolved in multiple inheritance?





25. : Which type of inheritance may cause Diamond Problem?





26. : Which inheritance requires virtual keyword to avoid ambiguity?





27. : What is the role of the scope resolution operator (::) in inheritance?





28. : Can destructors be inherited in C++?





29. : Can we override base class functions in derived class?





30. : What does “is-a” relationship indicate in OOP?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials