What are the differences between public, private, and
protected access?
Answer Posted / prashant kalmodiya
PUBLIC: Specifies that those all members are accessible
from any function.
PRIVATE: Specifies that those members are accessible only
from member functions and friends functions of the class.
PROTECTED: Specifies access to class members in the member-
list up to the next access specifier (public or private)
| Is This Answer Correct ? | 18 Yes | 8 No |
Post New Answer View All Answers
Discuss the possibilities related to the termination of a program before entering the mainq method?
What is an undefined reference/unresolved external symbol error and how do I fix it?
What does it mean to declare a member variable as static?
Difference between strdup and strcpy?
What is the latest c++ standard?
How do you traverse a btree in backward in-order?
How many types of modularization are there in c++?
What are default parameters? How are they evaluated in c++ function?
What are iterators in c++?
What operator is used to access a struct through a pointer a) >> b) -> c) *
What is the protected keyword used for?
What is math h in c++?
If you don’t declare a return value, what type of return value is assumed?
What should main() return in c and c++?
How do I get good at c++ programming?