InterviewSolution
| 1. |
What Are The Access Privileges In C++ ? What Is The Default Access Level ? |
|
Answer» The access privileges in C++ are private, PUBLIC and PROTECTED. The default access level assigned to MEMBERS of a CLASS is private. Private members of a class are accessible only within the class and by friends of the class. Protected members are accessible by the class itself and it’s sub-classes. Public members of a class can be accessed by anyone. The access privileges in C++ are private, public and protected. The default access level assigned to members of a class is private. Private members of a class are accessible only within the class and by friends of the class. Protected members are accessible by the class itself and it’s sub-classes. Public members of a class can be accessed by anyone. |
|