elibraryportal Logo

Feature of C++

C++ is an Object Oriented Programming Language. It provides a lot of features that are given below.

  1. Objects & Class
  2. Encapsulation
  3. Inheritance
  4. Polymorphism
  5. Abstraction
  6. Message Passing

1) Objects & Class


An Object is real world entity thats means every thing is an objects. Where Object consists of state & behaviour .

In OOPs, an object are represented by the variables and the operations are represendted by the functions.

  • State:- The State of an object is one of the possible conditions that an object can exist in and represented by its characteristics or attributes or data
  • Behaviour:- The Behaviour of an object determines how an object acts or behaves and is represented by the operation that it can perform.


A class is defined as a user-defined data type or data structure declared with keyword class which contains the entire set of similar data and the functions that the object possess. A class serves as a blueprint or template for its objects. A class has been defined any number of objects .

The objects of a class are also known as the instances .

2) Encapsulation

Encapsulation is the technique of binding or keeping together the data & the function in a single unit called a encapsulation.

Encapsulation is way to implement data abstraction.

3) Inheritance

Inheritance can be defined as the process where by an object of class acquires characteristics from the object of the other class.

4) Polymorphism

The word polymorphism meaning having Multiple forms. Polymorphism perform a single action in different ways.

5) Abstraction

Abstraction is mechanism to hide irrelevent details and represent only the essential feature so that one can focus on important things at a time.

For Example:- while driving a car , a driver only knows theessential feature to drive a car such as how to use clutch, brake, accelerator , gears, steering, etc.

6) Message Passing

Message passing is a process of interacting between different object in a program. When the program is executed these object interact or communicate with each other by sending and receiving messages. The messages are exchanged by calling the member function of these classes.