What are the differences between public, private, and
protected access?
Answer Posted / koushik k reddy
Private:
It cannot be accessed by object and cannot be inherited, will be used only by the member functions of the class
Protected:
It cannot be accessed by the object and used by the member functions of the class can be inherited to first level of inheritance
Public:
It can be accessed by the objects and can be inherited to any level
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we declare a base-class destructor as virtual?
What is std :: flush?
What is a manipulative person?
What do you mean by storage classes?
Explain shallow copy?
What is c++ mutable?
What is class invariant in c++?
Mention the purpose of istream class?
Name the operators that cannot be overloaded in C++?
How do c++ struct differs from the c++ class?
What is virtual base class?
In what situations do you have to use initialization list rather than assignment in constructors?
What is size_type?
What is the keyword auto for?
Array base access faster or pointer base access is faster?