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 an incomplete type in c++?
Which compiler does turbo c++ use?
Write a program to interchange 2 variables without using the third one.
How do you find out if a linked-list has an end? (I.e. The list is not a cycle)
What is stoi in c++?
What is a float in c++?
Which programming language should I learn first?
What is binary search in c++?
Do you know the use of vtable?
Show the declaration for a static member variable.
What is the difference between set and map in c++?
what do you mean by volatile variable?
What is capacity in vector in c++?
What is iomanip c++?
What is the default access level?