What are the three types of access specifiers in C++?



What are the three types of access specifiers in C++?..

Answer / nashiinformaticssolutions

1. Public: Every student in the class is reachable from anywhere within the application.
2. Private: Only member functions within the class have access to class members.
3. Protected: Any subclass of the class or the member functions within the class can access class members.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Why do we use classes in c++?

0 Answers  


which operator is used for performing an exponential operation a) > b) ^ c) none

0 Answers  


What is the identity function in c++? How is it useful?

0 Answers  


What is the difference between set and map in c++?

0 Answers  


How would perform Pattern Matching in C++?

0 Answers   Genpact,


How do you show the declaration of a virtual constructor?

0 Answers  


What is the copy-and-swap idiom?

0 Answers  


What do you mean by translation unit in c++?

1 Answers  


How to access a variable of the structure?

0 Answers  


What is #include math h in c++?

0 Answers  


What is flush c++?

0 Answers  


Explain pass by value and pass by reference.

0 Answers  


Categories