Differentiate between run time and compile time polymorphism.
Sr. No.
|
Compile time polymorphism
|
Runtime polymorphism
|
1 |
In this polymorphism, an object is bound to its function call at compile time.
|
In this polymorphism, selection of appropriate function is done at run time.
|
2 |
Functions to be called are known well before.
|
Function to be called is unknown until appropriate selection is made.
|
3 |
This does not require use of pointers to objects
|
This requires use of pointers to object
|
4 |
Function calls execution are faster
|
Function calls execution are slower
|
5 |
It is implemented with operator overloading or function overloading
|
It is implemented with virtual function.
|