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 / koushik k reddy

Private:
It cannot be accessed by object and cannot be inherited, will be used only by the member functions of the class
Protected:
It cannot be accessed by the object and used by the member functions of the class can be inherited to first level of inheritance
Public:
It can be accessed by the objects and can be inherited to any level

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are associate containers?

1043


What is class and structure in c++?

1183


Should a constructor be public or private?

1037


What are the 4 types of library?

1184


What is this pointer in c++?

1408


What is a buffer c++?

1065


What is the role of C++ shorthand's?

1284


Explain class invariant.

1069


Can you overload the operator+ for short integers?

1045


What is the difference between structure and class?

1282


Can you please explain the difference between static and dynamic binding of functions?

1033


What are member functions used in c++?

1152


What is the difference between an enumeration and a set of pre-processor # defines?

1393


What is diamond problem in c++?

1002


Why do we use pointers in c++?

1068