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

Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

948


an operation between an integer and real always yeilds a) integer result b) real result c) float result

1108


What are c++ templates used for?

1081


What things would you remember while making an interface?

952


What is the difference between ++ count and count ++?

1084


What is the difference between the functions memmove() and memcpy()?

1075


What is c++ runtime?

1049


Write a code/algo to find the frequency of each element in an array?

1049


What is new in c++?

1050


What is function declaration in c++ with example?

1008


What is an object in c++?

1148


What is doubly linked list in c++?

1028


Is vector a class in c++?

979


What are stacks? Give an example where they are useful.

988


Explain the different access specifiers for the class member in c++.

936