what are Access specifiers in C++ class? What are the types?



what are Access specifiers in C++ class? What are the types?..

Answer / Rahul Kumar Nailwal

Access specifiers in a C++ class control access to its members. They can be public, private, or protected. Public members are accessible from anywhere, while private members are only accessible within the class and its friends. Protected members have the same access as private members, but they can also be accessed by derived classes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is the use of string in c++?

1 Answers  


Describe the syntax of single inheritance in C++?

1 Answers   Fidelity,


Who discovered c++?

1 Answers  


Write a corrected statement in c++ so that the statement will work properly. x + y=z;

2 Answers  


Is c++ vector a linked list?

1 Answers  


Explain the need for "Virtual Destructor"?

2 Answers   Infosys,


What issue do auto_ptr objects address?

2 Answers  


what Is DCS ? what i will get benefit when i did?

1 Answers  


How did c++ start?

1 Answers  


What are the four partitions in which c++ compiler divides the ram?

1 Answers  


Which is the best c++ compiler for beginners?

1 Answers  


Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?

1 Answers  


Categories