adspace
what are Access specifiers in C++ class? What are the types?
Answer Posted / 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 View All Answers