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

Answer Posted / munish saini

** Public variables, are variables that are visible to all
classes.

** Private variables, are variables that are visible only
to the class to which they belong.

** Protected variables, are variables that are visible only
to the class to which they belong, and any subclasses.

Is This Answer Correct ?    41 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the iunknown interface?

684


Is c++ a high level language?

560


Differentiate between an array and a list?

711


What are the advantages of using friend classes?

636


Is c++ map a hash table?

572






Difference between a homogeneous and a heterogeneous container

669


What is heap sort in c++?

606


How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?

3213


What is c++ hiding?

625


Write about a nested class and mention its use?

632


Explain the concept of dynamic allocation of memory?

621


What is an orthogonal base class in c++?

662


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2075


Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?

572


What is the use of setfill in c++?

592