Question 1: C++ OOPS - Constructors
What is true about constructors in C++?
Question 2: C++ OOPS - Destructor Characteristics
Which of the following is true about destructors in C++?
Question 3: C++ OOPS - Getter Method
Which is the correct way to write a getter for salary (private) in class Employee?
Question 4: C++ OOPS - Virtual Inheritance
Which keyword is used to solve the diamond problem in C++?
Question 5: C++ OOPS - Pure Virtual Function
How do we declare a pure virtual function?
Question 6: C++ OOPS Partial Abstraction
Can an abstract class in C++ have normal (non-virtual) functions?
Question 7: C++ OOPS Friend Function and Object Passing
What will be the output?
Question 8: C++ OOPS Static Function Limitation
Which of the following is NOT allowed in static member functions?
Question 9: C++ OOPS Overloading Postfix ++
Which is the correct function signature for overloading postfix ++?
Question 10: C++ OOPS Multiple Inheritance & V-Table
How is V-Table affected in multiple inheritance?
Question 11: C++ OOPS - Destructor
Which symbol is used before the class name to define a destructor?
Question 12: C++ OOPS - Destructor Naming
Which is the correct way to define a destructor for class `Car`?
Question 13: C++ OOPS - Setter Method
Which is the best way to define a setter for salary in class Employee?
Question 14: C++ OOPS - Constructor Call Order
In inheritance, what is the order of constructor calls?
Question 15: C++ OOPS - Abstract Class Example
What will be the output?
Question 16: C++ OOPS Pure Virtual Function Without Definition
Which of the following is true about pure virtual functions?
Question 17: C++ OOPS Friend Function vs Member Function
Which of the following is true?
Question 18: C++ OOPS Static Variable Behavior
What will be the output?
Question 19: C++ OOPS Relational Operator Overloading
What will be the output?
Question 20: C++ OOPS Virtual Destructor Importance
Why should destructors be declared virtual in base classes?