31. What is the access specifier that restricts access to members of a class to only its friend classes and member functions in C++? A. friend B. public C. private 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
32. What does the term "this" pointer refer to in C++? A. Pointer to the base class object instance B. Pointer to the next object instance C. Pointer to the current object instance D. Pointer to the previous object instance 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. Which type of inheritance allows a class to inherit properties and behavior from multiple base classes in C++? A. Single inheritance B. Hierarchical inheritance C. Multilevel 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
34. What is the difference between an object and a class in C++? A. A class and an object are the same thing B. A class represents a specific instance, whereas an object represents a general template C. A class is a blueprint for creating objects, whereas an object is an instance of a class D. An object is a blueprint for creating classes, whereas a class is an instance of an object 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. What is the process of hiding the implementation details of a class and showing only the necessary features to the outside world called in C++? A. Encapsulation B. Inheritance C. Polymorphism D. Abstraction 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
36. What is the purpose of using virtual functions in C++? A. To achieve runtime polymorphism B. To create multiple instances of a class C. To hide the implementation details of a class D. To define functions within a class 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
37. Which keyword is used to prevent a class from being instantiated in C++? A. abstract B. sealed C. final D. static 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. Which operator is used to access members of a class through a pointer in C++? A. Star operator (*) B. Double colon (::) C. Dot operator (.) D. Arrow operator (->) 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
39. What is the term for the ability of a class to provide different implementations of a function depending on the types of its parameters in C++? A. Function overriding B. Function hiding C. Function overloading D. Function 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
40. Which access specifier allows members of a class to be accessed from anywhere in the program in C++? A. protected B. public 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