explain the types of access specifier. example progrm in C++
Answers
Answered by
5
In C++, there are three access specifiers: public - members are accessible from outside the class. private - members cannot be accessed (or viewed) from outside the class. protected - members cannot be accessed from outside the class, however, they can be accessed in inherited classes.
Answered by
1
Answer:
The public keyword is an access specifier. Access specifiers define how the members (attributes and methods) of a class can be accessed. ... public - members are accessible from outside the class. private - members cannot be accessed (or viewed) from outside the class.
Explanation:
hope it will help you
Similar questions
Social Sciences,
4 months ago
Physics,
4 months ago
English,
4 months ago
Physics,
8 months ago
India Languages,
8 months ago