Types of Polymorphism

  • Compile-time Polymorphism
  • Runtime Polymorphism

Types of Polymorphism

C++ Polymorphism

The word “polymorphism” means having many forms. In simple words, we can define polymorphism as the ability of a message to be displayed in more than one form. A real-life example of polymorphism is a person who at the same time can have different characteristics. A man at the same time is a father, a husband, and an employee. So the same person exhibits different behavior in different situations. This is called polymorphism. Polymorphism is considered one of the important features of Object-Oriented Programming.

Similar Reads

Types of Polymorphism

Compile-time Polymorphism Runtime Polymorphism...

1. Compile-Time Polymorphism

This type of polymorphism is achieved by function overloading or operator overloading....

2. Runtime Polymorphism

...