1.

___________ underlines the feature of Polymorphism in a class.(a) Nested class(b) Enclosing class(c) Inline function(d) Virtual FunctionThe question was posed to me during an online exam.Asked question is from OOPs Features topic in division OOPs Concept & Features of Object Oriented Programming

Answer»

The correct option is (d) VIRTUAL FUNCTION

Easy explanation - Virtual Functions can be defined in any class USING the keyword virtual. All the classes which inherit the class containing the virtual function, DEFINE the virtual function as REQUIRED. Redefining the function on all the derived classes according to class and use represents polymorphism.



Discussion

No Comment Found

Related InterviewSolutions