What are the differences between public, private, and
protected access?
Answer Posted / manjusinga
public is used for global access that is its scope is not
only within the class but also outside the class.
private is used only in the class class in which it is
defined.It cannot be accessible by its derived members.
protected is used within the class in which it is defined
and derived members of it can also access it.
Is This Answer Correct ? | 133 Yes | 10 No |
Post New Answer View All Answers
What is guard code in c++?
What is iterator in c++?
What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal
What is atoi in c++?
What do you mean by “this” pointer?
Is it possible to provide default values while overloading a binary operator?
What is c++ best used for?
How does c++ sort work?
How do we balance an AVL Tree in C++?
Implement stack operations with pointers with appropriate exception checks.
Explain the purpose of the keyword volatile.
Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---
What are the different types of comments allowed in c++?
What are the vectors in c++?
Can non graphic characters be used and processed in C++?