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
What does std mean in c++?
Can comments be nested?
How do we implement inheritance in c++?
Why #include is used?
Why cout is used in c++?
Explain how the virtual base class is different from the conventional base classes of the opps.
What are stacks? Give an example where they are useful.
When do you call copy constructors?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
What are static type checking?
What is the first name of c++?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
What is a linked list in c++?
What is singleton pattern in c++?
Write about c++ storage classes?