In C++, what happens if a derived class redefines a method that is already defined in its base class?
A. Method in the base class overrides the derived class method
B. Both methods are available for use
C. Method in the derived class overrides the base class method
D. A compilation error occurs
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