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

Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h

661


Write syntax to define friend functions in C++.

603


Explain what you mean by a pointer.

636


How many ways can a variable be initialized into in C++?

607


Is c++ high level programming language?

681






Difference between strdup and strcpy?

655


What is fixed in c++?

588


What is the prototype of printf function?

662


What is the sequence of destruction of local objects?

560


Explain the difference between static and dynamic binding of functions?

557


How to declare a pointer to an array of integers?

649


Why do we need templates?

542


What is time h in c++?

591


What is the use of endl?

550


State the difference between delete and delete[].

581