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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which type does string inherit from?

623


write a programe to calculate the simple intrest and compund intrest using by function overlading

1678


What is overriding in oops?

613


What is overloading in oops?

608


Is data hiding and abstraction same?

577






What is the advantage of oop over procedural language?

632


What is a function in oop?

639


What is the point of polymorphism?

598


What is oops?what is its use in software engineering?

565


What is data binding in oops?

594


What is polymorphism and types?

608


Why is destructor used?

589


What are the benefits of polymorphism?

630


Explain the advantages of inheritance.

682


to find out the minimum of two integer number of two different classes using friend function

1645