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 do you mean by public, private, protected and friendly?

Answers were Sorted based on User's Feedback



What do you mean by public, private, protected and friendly?..

Answer / kumar vishal

this is access specifier which is used with member data and
member function inside a class.

Is This Answer Correct ?    6 Yes 3 No

What do you mean by public, private, protected and friendly?..

Answer / achal ubbott

public means access to the object of the class, created in
outside world.

private and protected are almost the same, except the
difference that protected members are inheritable and thus
can be used by derived class. These can be accessed only by
the public function members of the class.

Is This Answer Correct ?    2 Yes 0 No

What do you mean by public, private, protected and friendly?..

Answer / diya verma

Public : it is access modifier and also known as visibility mode.It is used to declare public members in a class.It is also used in inherit the derived class which shows public member of base class with the help of object of derived class in global scope.The public member can be accessed outside the class.

Private:It is access modifier and also known as visibility mode.It is used to accessed inside the class I.e the member of class is private.
1. All the public member will be private member of child class.
2.All the protected member will be private member of child class.
3.Private member can't be inherit.

Protected:It is access modifier and also known as visibility mode.
1.All public members will be protected member of child class.
2.All the protected member will be protected member of child class.
3.Private member can't be inherit.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

all about pointers

2 Answers  


What is polymorphism explain?

0 Answers  


write a program in c++ to overload the function add (s1,s2) where s1 and s2 are integers and floating point values.

4 Answers  


write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation

1 Answers   College School Exams Tests, HCL, IBM, TCS,


How is data security provided in Object Oriented languages? ?

5 Answers  


What is sub classing in c++?

1 Answers  


what is the use of classes in c++;

2 Answers   HCL,


What is the importance of oop?

0 Answers  


What is the difference between a mixin and inheritance?

0 Answers  


what is the 3 types of system development life cycle

1 Answers  


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

0 Answers   Accenture,


what is different between oops and c++

0 Answers   IIT,


Categories