Question 1: C++ OOPS - Object Access
Which operator is used to access class members via an object?
Question 2: C++ OOPS - Copy Constructor
Which of the following correctly declares a copy constructor for class `Student`?
Question 3: C++ OOPS - Access Control
What will happen if you try to directly access a private data member of a class?
Question 4: C++ OOPS - Multilevel Inheritance Code
What will the following program print?
Question 5: C++ OOPS - Virtual Function
What will this code print?
Question 6: C++ OOPS Abstract Class Instantiation
What happens if you try to instantiate an abstract class in C++?
Question 7: C++ OOPS Friend Function Multiple Classes
What will be the output?
Question 8: C++ OOPS Static Member Function Call
How can a static member function be called?
Question 9: C++ OOPS Friend Function Operator Overloading
What will be the output?
Question 10: C++ OOPS Pure Virtual Function & V-Table
Which statement is true about pure virtual functions?
Question 11: C++ OOPS - Pointer to Object
If Student *ptr; is a pointer to a Student object, how can we call its function show()?
Question 12: C++ OOPS - Implicit Copy Constructor
When does the compiler provide a default copy constructor?
Question 13: C++ OOPS - Encapsulation & Abstraction
How is encapsulation different from abstraction?
Question 14: C++ OOPS - Diamond Problem
The "diamond problem" occurs in which type of inheritance?
Question 15: C++ OOPS - Non-virtual Function
What happens if `virtual` is removed in the above code?
Question 16: C++ OOPS Abstraction with Multiple Derived Classes
What will be the output of this code?
Question 17: C++ OOPS Friend Class Concept
Which statement is true about friend classes in C++?
Question 18: C++ OOPS Static Member and Object Lifetime
What happens to static members when all objects of the class are destroyed?
Question 19: C++ OOPS Operator Overloading Limitation
Which of the following statements is NOT true?
Question 20: C++ OOPS V-Table Concept
What is the V-Table in C++?