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

Answer Posted / prashanth c patel

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 ?    21 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the parameter to a template and the parameter to a function?

629


Should I learn c++ c?

607


What is class definition in c++ ?

627


What is virtual destructor? What is its use?

573


How does the copy constructor differ from the assignment operator (=)?

619






What is polymorphism in c++? Explain with an example?

606


what is oops and list its features in c++?

544


What is the difference between containment and delegation?

701


What are the methods of exporting a function from a dll?

648


How is static data member similar to a global variable?

577


Why should we use null or zero in a program?

600


C is to C++ as 1 is to a) What the heck b) 2 c) 10

637


What are the various operations performed on stack?

627


What is flag in computer?

601


How much maximum can you allocate in a single call to malloc()?

633