public, private, protected inheritance (Inheritance access specifiers)

 

public inheritance makes public members of the base class as public members in the derived class, and the protected members of the base class as protected members in the derived class.the private members of the base class doesn't take part in inheritance. 

पब्लिक इनहेरिटेंस में बेस क्लास के पब्लिक मेम्बर्स, डीराईव्ड क्लास के पब्लिक मेम्बेर्स होते है एवं बेस क्लास के प्रोटेक्टेड मेम्बर्स डीराईव्ड क्लास के प्रोटेक्टेड मेम्बर्स होते है।बेस क्लास के प्राइवेट मेम्बर्स इनहेरिटेंस में भाग नहीं लेते है।  

protected inheritance makes public members of the base class as protected members in the derived class, and the protected members of the base class as protected members in the derived class.the private members of the base class doesn't take part in inheritance. 

प्रोटेक्टेड इनहेरिटेंस में बेस क्लास के पब्लिक मेम्बर्स, डीराईव्ड क्लास के प्रोटेक्टेड मेम्बेर्स होते है एवं बेस क्लास के प्रोटेक्टेड मेम्बर्स डीराईव्ड क्लास के प्रोटेक्टेड मेम्बर्स होते है।बेस क्लास के प्राइवेट मेम्बर्स इनहेरिटेंस में भाग नहीं लेते है।  

private inheritance makes public members of the base class as private members in the derived class, and the protected members of the base class as private members in the derived class. the private members of the base class doesn't take part in inheritance.
प्राइवेट इनहेरिटेंस में बेस क्लास के पब्लिक मेम्बर्स, डीराईव्ड क्लास के प्राइवेट मेम्बेर्स होते है एवं बेस क्लास के प्रोटेक्टेड मेम्बर्स डीराईव्ड क्लास के प्राइवेट मेम्बर्स होते है। बेस क्लास के प्राइवेट मेम्बर्स इनहेरिटेंस में भाग नहीं लेते है।  

Comments

Popular posts from this blog

OOPs using C++ Language Topics Covered

IMP Questions of OOPS using CPP