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

Answer Posted / vivek kumar kaushal

Public: this is member function of its own and anyother
class.
Private: Class member access within its class.
Protected:this is member function to its own and derived
class.

Is This Answer Correct ?    34 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bubble sort c++?

565


What is const in c++?

588


Can a list of string be stored within a two dimensional array?

563


What are the various storage classes in C++?

641


Why null pointer is used?

573






When should you use global variables?

619


Explain differences between alloc() and free()?

570


How do you clear a map in c++?

561


Can you write a function similar to printf()?

659


Which bit wise operator is suitable for checking whether a particular bit is on or off?

597


What is an orthogonal base class in c++?

644


What is the use of endl?

535


What is function overloading in C++?

715


What's the most powerful programming language?

580


Can member data be public?

589