Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are the differences between public, private, and
protected access?

Answer Posted / krishnachaitanya narne adeesh

Public data is used to access from any where in the program
means any class or any member function can utilize those
variables and member functions.

Where as Private data will not give access to any other
classes and also for derived classes it use those variables
only on particular class only.

Here Protected is similar to Private but difference is just
it gave access to its derived classes also. This is also
opposite to Public.

Is This Answer Correct ?    46 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What can I use instead of namespace std?

1153


Describe linked list using C++ with an example.

1085


What is function overloading in C++?

1426


What gives the current position of the put pointer?

1000


Can we make copy constructor private in c++?

1056


What are the general quetions are in DEna bank manager IT/System interviews?

2021


Is set c++?

1002


When one must use recursion function? Mention what happens when recursion functions are declared inline?

1192


What is the difference between an array and a list?

1033


What is else if syntax?

1164


What is the copy-and-swap idiom?

1107


what are the decision making statements in C++? Explain if statement with an example?

1093


Which is best c++ or java?

1084


What is an undefined behavior and sequence points

1008


Do you need a main function in c++?

1121