Basic Concepts of OOP: Polymorphism

| Last Updated: | In: C++ Tutorial


In this tutorial, I will explain the basic concepts of polymorphism of OOP (Object Oriented Programming). I will make this tutorial as easy as possible so that it would be easy to understand to everyone.

What is Polymorphism?

The word Polymorphism is a Greek word from polys means “many, much” and morphē means of many forms. Polymorphism is the 3rd pillar of OOP (Object Oriented Programming). Object oriented programming is incomplete without having the polymorphism. In the other words, “many forms of a single object is called Polymorphism”.

There are two types of polymorphism:

  1. Compile time polymorphism
  2. Runtime polymorphism

Compile time polymorphism

In C++ programming language, you can write the c++ programs by compile time polymorphism in two way which is described below in details.

  1. Function overloading
  2. Function overriding

Runtime polymorphism

In C++ programming language, you can achieve the Runtime polymorphism with the help of virtual function.


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


You may also like:

Tags: , , , , , , , ,