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
What apps are written in c++?
Does improper inheritance have a potential to wreck a project?
Can recursive program be written in C++?
Why we use #include iostream in c++?
What is the sequence of destruction of local objects?
Can we define a constructor as virtual in c++?
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
Are c and c++ different?
Explain differences between new() and delete()?
What are shallow and deep copies?
Can you explicitly call a destructor on a local variable?
Why struct is used in c++?
When should you use global variables?
Is there a c++ certification?
Explain the use of virtual destructor?