What are the differences between public, private, and
protected access?
Answer Posted / kalpana.y
Private is used for intialization of variables
eg:
int p,r;
public is used for function name
eg:
void display();
protected is used for void main()
eg:
void main()
class c;
| Is This Answer Correct ? | 24 Yes | 86 No |
Post New Answer View All Answers
Can turbo c++ run c program?
What is abstract class in c++?
What are the syntactic rules to be avoid ambiguity in multiple inheritance?
What is a vector c++?
What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor
Can we define a constructor as virtual in c++?
What is the type of 'this' pointer?
What is fixed in c++?
What are static member functions?
Which function cannot be overloaded c++?
Why do we use classes in c++?
What do you mean by const correctness?
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.
What are structs in c++?
What is function declaration in c++ with example?