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 restrictions apply to constructors and destructors?

1081


What is void pointer in c++ with example?

1096


What is the benefit of learning c++?

990


How do you clear a set in c++?

1076


Does c++ have arraylist?

1017


What is cin clear () in c++?

1227


Write a program to find the Fibonacci series recursively.

1073


What is abstract class in c++?

1054


How do you decide which integer type to use?

1008


What is the role of copy constructor in copying of thrown objects?

1070


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

1115


What are the new features that iso/ansi c++ has added to original c++ specifications?

1140


What is setbase c++?

1132


How const int *ourpointer differs from int const *ourpointer?

1137


What is the use of default constructor?

1094