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: Option C
Related Questions on Inheritance in C plus plus
A. Multilevel inheritance
B. Hierarchical inheritance
C. Multiple inheritance
D. Single inheritance
A. public
B. private
C. friend
D. protected
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

Join The Discussion