1.

Abstract functions of a base class _________________(a) Are overridden by the definition in same class(b) Are overridden by the definition in parent class(c) Are not overridden generally(d) Are overridden by the definition in derived classThis question was addressed to me by my school teacher while I was bunking the class.The origin of the question is Overriding Member Functions topic in section Member Functions & its Types of Object Oriented Programming

Answer»

The correct answer is (d) Are overridden by the definition in derived CLASS

Easiest explanation - The functions declared to be abstract in BASE class are redefined in derived CLASSES. That is, the functions are overridden by the definitions given in the derived classes. This must be DONE to GIVE at least one definition to each undefined function.



Discussion

No Comment Found

Related InterviewSolutions