What are the different types of Polymorphism?

Types of Polymorphism:

  1. Compile time polymorphism: Compile time polymorphism is implemented by Function overloading and Operator Overloading in C++. In compile time polymorphism compiler uses static binding which decides function calls at the compile time rather than at run time. It is also known as early binding.  In this type of polymorphism, lesser memory space is used. Also the calling of different functions is much faster because the function which is to be called is decided at the compilation time.
  2. Run time polymorphism: Run time polymorphism is performed by Virtual Functions in C++. In Run time polymorphism, compiler uses Dynamic binding which decides function calls at the run time rather than at compile time. It is also known as Late Binding as which function to call is decided at the run time. This type of polymorphism provides flexibility in calling functions.

More Questions

Leave a Reply

Word Verfication * Time limit is exhausted. Please reload CAPTCHA.