What are the differences between public, private, and
protected access?

Answer Posted / abhay

public-->inherite the protected members as preotected in
drived class and pubic members wiull be public in derived
class

protected--->pubic and protecated members of the base class
will become protected in derived class

Private-->pubilc and proteacted members will become private
in derived class

Is This Answer Correct ?    14 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is Loop function? What are different types of Loops?

645


Explain deep copy?

610


Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..

3360


What is a storage class? Mention the storage classes in c++.

595


Please explain the reference variable in c++?

618






Give example of a pure virtual function in c++?

589


What is the use of vtable?

673


Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes

591


What are inline functions? What is the syntax for defining an inline function?

583


What is the return value of the insertion operator?

606


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

3704


Explain data encapsulation?

612


What is #include c++?

571


When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?

575


What is endl?

638