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 is basic if statement syntax?

1009


On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?

1070


Why is c++ still used?

1012


Explain friend class?

1085


How do you flush std cout?

1035


What are the advantages of early binding?

1012


What is encapsulation in c++ with example?

953


Can notepad ++ run c++?

1003


What is the difference between C and CPP?

1099


What is the use of dot in c++?

1028


What is auto type c++?

1077


What are the stages in the development cycle?

987


What is a float in c++?

931


What do you mean by translation unit?

1036


what are the events occur in intr activated on interrupt vector table

1667