What is the difference between public, private, protected
inheritance?

Answer Posted / dee

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 ?    170 Yes 48 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is array in c++ example?

627


What is buffer and example?

513


What is scope resolution operator in c++ with example?

541


List the merits and demerits of declaring a nested class in C++?

593


What is implicit conversion/coercion in c++?

636






Is ca high or low level language?

569


Define private, protected and public access control.

594


What are the uses of static class data?

624


How compile and run c++ program in turbo c++?

612


What is the sequence of destruction of local objects?

546


What is a driver program?

617


Explain class invariant.

577


What are c++ variables?

523


What's the "software peter principleā€?

605


Explain the concept of memory leak?

607