What is Polymorphism?

Poly means many and morph means forms or shape. Thus the word Polymorphism comes from Greek and it basically means having many forms.

For example,

Your DAD is your father. He’s your mom’s Husband. He’s your grandma’s son as well. Thus here your DAD is exhibiting many forms. He’s a father, son, husband, brother, etc.

In C++, polymorphism can be divided into two types:

  1. Compile-time Polymorphism
  2. Run-time Polymorphism

Difference Between Compile Time And Run Time Polymorphism In C++

In this article, we will discuss the differences between the compile-time and runtime polymorphism in C++.

Similar Reads

What is Polymorphism?

Poly means many and morph means forms or shape. Thus the word Polymorphism comes from Greek and it basically means having many forms....

Compile Time Polymorphism in C++

In compile-time polymorphism, the compiler determines which function or operation to call based on the number, types, and order of arguments. It is also called Static Polymorphism as the function calls are statically binded to its definition....

Run Time Polymorphism

...

Difference Between Compile Time And Run Time Polymorphism

...

Contact Us