What are the differences between public, private, and
protected access?
Answer Posted / manjusinga
public is used for global access that is its scope is not
only within the class but also outside the class.
private is used only in the class class in which it is
defined.It cannot be accessible by its derived members.
protected is used within the class in which it is defined
and derived members of it can also access it.
| Is This Answer Correct ? | 133 Yes | 10 No |
Post New Answer View All Answers
What are the restrictions apply to constructors and destructors?
What is void pointer in c++ with example?
What is the benefit of learning c++?
How do you clear a set in c++?
Does c++ have arraylist?
What is cin clear () in c++?
Write a program to find the Fibonacci series recursively.
What is abstract class in c++?
How do you decide which integer type to use?
What is the role of copy constructor in copying of thrown objects?
What is the difference between map and hashmap in c++?
What are the new features that iso/ansi c++ has added to original c++ specifications?
What is setbase c++?
How const int *ourpointer differs from int const *ourpointer?
What is the use of default constructor?