Computer Science, asked by srikanthnagunuri039, 8 months ago

explain the types of access specifier. example progrm in C++​

Answers

Answered by ItzCupcake
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 ramansangwan64
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