1. In C++, which type of inheritance allows a class to inherit properties and behavior from multiple base classes? A. Multilevel inheritance B. Hierarchical inheritance C. Multiple inheritance D. Single inheritance Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
2. What is the access specifier that restricts access to members of a class to only its derived classes in C++? A. public B. private C. friend D. protected Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
3. What is the process of defining a new class based on an existing class in C++ called? A. Inheritance B. Composition C. Encapsulation D. Polymorphism Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
4. Which keyword is used to signify inheritance in C++? A. extends B. inherit C. using D. : public Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
5. In C++, which access specifier allows members of a base class to be accessible in the derived class but not to the outside world? A. friend B. private C. public D. protected Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
6. What is the diamond problem in C++? A. Ambiguity in single inheritance B. Ambiguity in hierarchical inheritance C. Ambiguity in multiple inheritance D. Ambiguity in multilevel inheritance Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
7. What is the default access specifier for members of a class in C++ when using inheritance? A. protected B. private C. friend D. None of the above Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
8. What happens if a derived class redefines a method that is already defined in its base class in C++? A. Compilation error B. Both methods are available separately C. Method in the derived class overrides the base class method D. Method in the base class overrides the derived class method Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
9. In C++, which type of inheritance is not supported directly but can be achieved using a combination of other types of inheritance? A. Multiple inheritance B. Single inheritance C. Hierarchical inheritance D. Hybrid inheritance Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
10. What is the name for the process by which a class inherits features from another class in C++? A. Derivation B. Combination C. Composition D. Encapsulation Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board