What is Inheritance in C++ in Hindi Complete Guide

C++ ka most important feature ‘Reusability’ hai. Iske Jariye ham Kisi existing class ko Kai types Se use Kr Sakte Hai.

Re-usability Ka Real Mean “Kisi Class ko bar – bar Testing & debugging Karke use save kar diya jata Hai, Aur jarurat padne per us Class Ka use Kisi Dusri Class Me Kisi Particuler Work ko krne ke liye Kiya jata hai, C++ me is feature ko inheritance kaha jaata hai.”

Simple Language me kahu to “Inheritance ek aisi process hai. Jisme kisi bhi ek class ki property ko dusri class me use kiya jaa sakta hai.

Mode Of Inheritance in C++ In Hindi

C++ me following access specifier ya access control Ka Use Kiya Jata Hai. Isme 3 Types Ke Mode Hote Hai, Jisme Public mode ka use Sabse Jyada Kiya Jata Hai.

* private    * protected   * public

inheritance mode limitation
  1. Private Mode: Base class Ke private member derived class Se kabhi bhi inherit Nahi kiyee jaa sakte hai. But Base Class ke public & protected member derived class me private ban Jayenge.
  2. Public Mode: Is Mode Me Base Class Ke public member derived class me public aur base class ke protected members derived class me protected ban Jate hai.
  3. Protected Mode: Ager derived class ko base class Se inherit kiya Jata hai to base class ke public & Protected Members derived class me protected bani.

Types Of Inheritance in C++ In Hindi

  • Single Inheritance

Single Inheritance Aisa inheritance Hota Hai Jisme Keval Ek Derived Class Single Base Class Se inherit Rahti hai. Isko Aap Badi Asaani Se Daigram Dekh Kar Samajh Sakte hai.

  • Multilevel Inheritance

Multilevel In heritance Me Pahle Ek Derived Class Ko Base Class Se Inherit Kiya Jaata Hai Aur Uske Baad Us Derived Class Se Ek Aur Derived Class Ko Inherit Kr Diya Jata hai.

  • Multiple Inheritance

Jab 2 Ya 2 Se Jyada Base Class Ko Kisi Ek Derived Class Se Inherit Kiya Jaata hai To Isko Multiple Inheritance Kahte hai.

  • Hierarchical Inheritance

Hierarchical Inheritance Me Ek Base Class 2 Ya 2 Se Jyada Derived Classes Se Inherit Rahti Hai.

  • Hybrid Inheritance

Hybrid Inheritance Multilevel & Hierarchical Inheritance Ka Combination Hota hai. Aap Isko Image Me Dekh Kr Aasani Se Samajh Sakte hai.

Inheritance in C++ Program Example



class student



int rno;

char name[20];


void out()

{ cout<<rno<<“\t”<<name<<“\t”;


void in()

{cout<<“enter roll no =”;


cout<<“enter name=”;



class sport : public student

{ private:

char game[20];


void show()




void get()

{ in();

cout<<“enter game= “;



void main()



sport s;





Most Important Points In Inheritance In C++ Hindi
  1. The base class also knows as super & parent class.
  2. Derived class also knows as sub & child class.
  3. If we inherit derived class to any base class no C++ so default access specifier was private.
  4. A derived class inherits all things of Base class.
Here Is The Video Guide To Learn What Is Inheritance In C++ In Hindi


C++ Lnaguage me Inheritance Ek Bahut useful Function hai, Jiske Jariye ham ek class ki saari property dusri class me Use Kar Sakte hai, Jesse time Save Hota Hai.

Thankyou For Reading This Post, If You Like Than Share With Your Friends Of Social Media.

Related Post:

What is inline Function in C++ in Hindi Language Puri Jankari

What Is Friend Function in C++ With Example In Hindi

What is Constructor in C++ in Hindi with an example

More Tags: what is inheritance in C++ Complete Guide, inheritance in c++ with example program in Hindi, inheritance in c++ with types, inheritance in c++ with Diagram, what is inheritance in c++ with Simple example, what is inheritance in c++Hindii, Types Of Inheritance in Hindi.


Hello Friends, I'm Shubham Gupta. Eduinhindi Ka founder, I just want to learn new things consistently that is why I created this blog. If you like my post share with your friends on the social media platform.

Recent Posts

What Is Polymorphism in oops | Compile & runtime polymorphism Example

What is a polymorphism in oops – Did you Want to Know What is Compile & runtime polymorphism With the…

10 months ago

Top 10 camera apps for android Jo apko download krna cahiye

Top 10 camera apps for android Jo apko download krna cahiye:-  aaj ki ye post hamare un friends ke liye…

1 year ago

Top 5 photo banane wala apps for android mobile downloads

'Top 5 photo banane wala apps for android mobile:- aj kis yeh post un selfie lovers ke liye hai jo…

1 year ago

What is inline Function in C++ in Hindi Language Puri Jankari

What is inline Function in C++ in Hindi Language Puri Jankari:  Programming me function ka main objective memory Program ko small…

1 year ago

What is a database in Hindi Puri Jankari

What is a database in Hindi complete information: Hello friends, today we are going to learn about What is a database in…

1 year ago

What Is Friend Function in C++ With Example In Hindi

What Is Friend Function in C++ With Example In Hindi:- Hello Friends Mera Naam Shubham Hai, & I am Back With…

1 year ago