Basic Concepts of OOP: Polymorphism

Prem Tiwari - - 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.

Prem Tiwari

Prem Tiwari is the founder of and also a professional developer and a blogger by hobby.

Tags: , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.