Technical Discussion :: C++
Home > Freshers > Technical Interview Questions > C++
14. What is polymorphism and Pure-Polymorphism?
Answer:
When a method is declared as abstract/virtual method in a base class and which is overridden in a base class. If we create a variable of a type of a base class and assign an object of a derived class to it, it will be decided at a run time, which implementation of a method is to be called.
This is known as Pure-Polymorphism or Late-Binding.
Asked In :: Aricent Syntel Inc. Sapient
Mean by more than one form. Ability to provide different implementation based on different number/type of parameters.
When a method is declared as abstract/virtual method in a base class and which is overridden in a base class. If we create a variable of a type of a base class and assign an object of a derived class to it, it will be decided at a run time, which implementation of a method is to be called.
This is known as Pure-Polymorphism or Late-Binding.
This is known as Pure-Polymorphism or Late-Binding.
Polymorphism means having many forms literally. A name but with multiple functionalities. For example a female is student to the school and daughter to her parents.