What are the access privileges in C++? What is the default access level?

What are the access privileges in C++? What is the default access level?

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.

By:Umang
Date:2006-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher