English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

What is the difference between public and private visibility modes? - Computer Science

Advertisements
Advertisements

Question

What is the difference between public and private visibility modes?

Distinguish Between

Solution

Private visibility mode:
When a base class is inherited with private visibility mode the public and protected members of the base class become ‘private’ members of the derived class.

Public visibility mode:
When a base class is inherited with public visibility mode, the protected members of the base class will be inherited as protected members of the derived class and the public members of the base class will be inherited as public members of the derived class.

shaalaa.com
Visibility Modes
  Is there an error in this question or solution?
Chapter 16: Inheritance - Evaluation - Section - B [Page 273]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 16 Inheritance
Evaluation - Section - B | Q 5. | Page 273
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×