English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Explain the different visibility modes through pictorial representation? - Computer Science

Advertisements
Advertisements

Question

Explain the different visibility modes through pictorial representation?

Answer in Brief

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.

Protected visibility mode:
When a base class is inherited with protected visibility mode the protected and public members of the base class become ‘protected 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 - D [Page 273]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×