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
Explain the difference between static and dynamic binding of functions?
What is Destructor in C++?
If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?
What is while loops?
Is overriding possible in c++?
Explain the difference between new() and malloc() in c++?
What are the new features that iso/ansi c++ has added to original c++ specifications?
Explain stack & heap objects?
What is virtual base class uses?
What are the advantages of using typedef in a program?
What do you mean by a template?
What is do..while loops structure?
Is recursion allowed in inline functions?
Why ctype h is used in c++?
Is there any difference between int [] a and int a [] in c++?