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
Is c++ a pure oop language?
Explain overriding.
What is the purpose of ios::basefield in the following statement?
Can we declare a base-class destructor as virtual?
How the endl and setw manipulator works?
What is the use of typedef?
What is the use of setprecision in c++?
What is a local variable?
Discuss the possibilities related to the termination of a program before entering the mainq method?
What is a modifier in c++?
What are the differences between java and c++?
What is the iunknown interface?
What is size of string in c++?
What is command line arguments in C++? What are its uses? Where we have to use this?
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.