1.

Use of pointers or reference to an abstract class gives rise to which among the following feature?(a) Static Polymorphism(b) Runtime polymorphism(c) Compile time Polymorphism(d) Polymorphism within methodsThis question was posed to me in an interview for job.Origin of the question is Abstract Class in section Classes of Object Oriented Programming

Answer» CORRECT choice is (B) Runtime polymorphism

Easy explanation - The runtime polymorphism is SUPPORTED by REFERENCE and pointer to an abstract class. This relies upon base class pointer and reference to select the proper virtual function.


Discussion

No Comment Found

Related InterviewSolutions