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 / 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


Please Help Members By Posting Answers For Below Questions

When do we use copy constructors?

1133


How is static data member similar to a global variable?

1170


How to allocate memory dynamically for a reference?

1095


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

1165


What is late binding c++?

1030


What is copy constructor? Can we make copy constructor private in c++?

1130


What is dev c++ used for?

1082


What is jump statement in C++?

1211


What is fixed in c++?

1081


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

1233


What does namespace mean in c++?

1141


What is an overflow error?

1155


Is swift faster than c++?

1070


What are the manipulators in c++?

1087


What is enum class in c++?

1320