31. In C++, which access specifier allows the members of a base class to be accessible in the derived class, but not from outside the class? 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
32. What is the term used to describe a class that inherits properties and behaviors from another class in C++? A. Base class B. Child class C. Derived class D. Parent class 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
33. In C++, what is the default access specifier for a base class when inheriting? A. private B. public C. protected D. friend 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
34. What is the process called when a new class is created by inheriting properties and behaviors from an existing class in C++? A. Composition B. Encapsulation C. Inheritance D. Polymorphism 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
35. In C++, what is the process called when a class inherits properties and behaviors from multiple base classes? A. Hierarchical inheritance B. Multiple inheritance C. Multilevel inheritance 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
36. What happens if a derived class inherits multiple base classes and each base class contains a member with the same name in C++? A. The member of the derived class must explicitly specify which base class member to access B. The member of the derived class will access the member from the base class with the same name C. A compilation error occurs D. The member of the derived class accesses all members with the same name from all base classes 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
37. In C++, which access specifier allows the members of a base class to be accessible in the derived class, its derived classes, but not from outside the class hierarchy? A. friend B. private C. protected D. public 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
38. In C++, which keyword is used to denote the access specifier in a derived class when inheriting from a base class? A. using B. inherits C. extends D. : protected 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
39. In C++, what happens if a derived class inherits from multiple base classes and each base class has a member with the same name? A. The member of the derived class must explicitly specify which base class member to access B. The member of the derived class will access the member from the base class with the same name C. A compilation error occurs D. The member of the derived class accesses all members with the same name from all base classes 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
40. Which type of inheritance involves a class inheriting from multiple classes directly or indirectly in C++? A. Multilevel inheritance B. Hierarchical inheritance C. Single inheritance D. Multiple 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