Which are the different visibility modes available in a class?
Answers
Answered by
1
Answer:
There are three types of Visibility modes:
- Public Visibility mode: If we derive a subclass from a public base class. ...
- Protected Visibility mode: If we derive a subclass from a Protected base class. ...
- Private Visibility mode: If we derive a subclass from a Private base class.
Explanation:
Answered by
0
Explanation:
An important feature of Inheritance is to know which member of the base class will be acquired by the derived class. This is done by using visibility modes.
The accessibility of base class by the derived class is controlled by visibility modes. The three visibility modes are private, protected and public. The default visibility mode is private. Though visibility modes and access specifiers look similar, the main difference between them is Access specifiers control the accessibility of the members with in the class where as visibility modes control the access of inherited members with in the class.
Similar questions