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 is the c++ code?

1225


Give 10 points of differences between C & C++.

1191


What is late binding c++?

1030


what is the use of void main() in C++ language?

1169


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

1052


Do you know what are static and dynamic type checking?

1104


How to get the current position of the file pointer?

1101


Why cstdlib is used in c++?

1097


Explain the static storage classes in c++.

1325


Is c++ a difficult language?

1204


Can a constructor be private?

1121


Write a Program to find the largest of 4 no using macros.

1141


Are there any special rules about inlining?

1132


Who discovered c++?

1099


How do you remove an element from a set in c++?

1138