Polymorphism in C++-Basics

Polymorphism

Poly means more than one and morphism means forms.

So, polymorphism means having more than 1 forms.

 

Polymorphism can be classified as-:

1)Compile time polymorphism

2)Run-time polymorphism

 

Compile time polymorphism is implemented through function overloading and operator overloading.[ Compile time polymorphism is also called static polymorphism or early binding because a compiler links the appropriate function definition for a particular function call before the program is running].

Run time polymorphism is achieved through virtual functions.

[Run time polymorphism is also called late binding or dynamic binding because appropriate function definition for a particular function is known by the compiler only when the program is running].

Be the first to comment

Leave a Reply

Your email address will not be published.


*