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 difference between object-oriented programming and procedural programming?

679


How one would use switch in a program?

603


What is ifstream c++?

542


What is a c++ vector?

578


Do you know the problem with overriding functions?

563






Explain the uses oof nested class?

613


What is the use of default constructor?

555


What is struct c++?

557


write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;

1494


What is a c++ class?

604


What is c++ similar to?

581


What is constructor in C++?

613


What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

572


What is the use of c++ programming language in real life?

550


What is istream and ostream in c++?

576