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
Explain shallow copy?
What is an orthogonal base class in c++?
Name four predefined macros.
Why do you use the namespace feature?
Difference between a copy constructor and an assignment operator.
Is facebook written in c++?
Is c++ primer good for beginners?
Do inline functions improve performance?
What are the defining traits of an object-oriented language?
What is code reusability in c++?
Write is a binary search tree? Write an algo and tell complexity?
What is meant by a delegate?
Describe the advantages of operator overloading?
Why do we use templates?
What is the use of 'this' pointer?