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 is the v-ptr?

1168


Is swift a good first language?

1051


Are there any special rules about inlining?

1085


What is long in c++?

1251


What is a pdb file?

1008


Who discovered c++?

1054


What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard

1034


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

1143


Describe linkages and types of linkages?

998


What does std :: flush do?

1142


Difference between a copy constructor and an assignment operator.

1005


What are c++ tokens?

1063


Distinguish between a # include and #define.

1153


Explain how would you handle a situation where you cannot call the destructor of a local explicitly?

973


What are friend classes?

1071