1.

It is ____________________ to define the abstract functions.(a) Mandatory for all the classes in program(b) Necessary for all the base classes(c) Necessary for all the derived classes(d) Not mandatory for all the derived classesThis question was posed to me during an interview.I need to ask this question from Abstract Function topic in section Member Functions & its Types of Object Oriented Programming

Answer»

The correct option is (c) Necessary for all the derived classes

For EXPLANATION: The derived classes MUST DEFINE the abstract function of BASE class in their own body. This is a necessary CONDITION. Because the abstract functions doesn’t contain any definition in base class and hence becomes mandatory for the derived class to define them. All the functions in a program must have some definition.



Discussion

No Comment Found

Related InterviewSolutions