Q:

Compare compile-time polymorphism and Run-time polymorphism in c++?

0

Compare compile-time polymorphism and Run-time polymorphism?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

The following table describes the basic difference between compile-time polymorphism and run-time polymorphism.

Compile-time polymorphism Run time polymorphism
The function called resolved at the compile time. The function called resolved at the run time.
It is also known as overloading, early binding, and static binding. It is also known as overriding, Dynamic binding, and late binding.
Inheritance is not required for compile-time polymorphism. Inheritance is required for compile-time polymorphism.
It provides fast execution as it is known at the compile time. It provides slow execution as it is known at the run time.
The virtual keyword is not involved here. The virtual keyword plays an important role here.
It is less flexible as mainly all the things execute at the compile time. It is more flexible as all the things execute at the run time.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now