1. Class
  2. Object
  3. Data abstraction
  4. Encapsulation
  5. Inheritance
  6. Polymorphism
  7. Template / generosity


Class: – it is a blueprint for which only virtual structure is mentioned (It does not have physical intense). A class may have many dots members (Member variables as well as member function).

Syntax: –

                                Class class_Name


_ _ _ _ _

Member variables;

_ _ _ _ _

Member function();

_ _ _ _ _


Ex: –

class person


int age;

char name;

long phone;


Object: – It is an instance of a class it has physical existence unlike class.

  1. It is also called runtime entity (Because object is created during execution of program through main function)
  2. Objects always holds the members variables of a class to when it concern

Syntax: –

Declaration / creation of object

Class_Name       Object_Name;

Person                  Lalit;

Person                  Sony,Sachin,Vivek;

Data abstraction: – it is a process by which we hide the unwanted information and only concerning with the important information which is required for user.

Ex: – By using private access for inside class we can hide our data to other class.

Encapsulation: – It is a process of binding or packing data members, member function, constructor, destructor etc. inside one packet.

Ex: – class

Inheritance: – It is a process in which one class is created from another class. The class which is created is called as deri / class child class.

The class from which child class created is called as base / parent class.

Polymorphism: – Through which multiple functions with same name have to perform different tasks.

Ex: – The types of polymorphism are

  1. Function overloading
  2. Function overriding
  3. Operator overloading

Template / generosity: – It is a process that allows a function or a class to work with different – different data types (That type of function is called template function)