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

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

1031


What is extern c++?

943


Can I uninstall microsoft c++ redistributable?

1036


Do vectors start at 0 c++?

976


What is the benefit of c++?

1044


Difference between pointer to constant and constant pointer to a constant. Give example.

1062


What is std :: endl?

972


Can constructor be static in c++?

1048


What is the use of function pointer?

975


What is pointer to array in c++?

1078


What is the difference between set and map in c++?

1092


Why struct is used in c++?

1064


What are the uses of static class data?

1118


How can a called function determine the number of arguments that have been passed to it?

1075


Why is the function main() special?

1039