What is the difference between public, private, protected
inheritance?
Answer Posted / adit
# 3
for V.M public
class a class b
private =! private.
public = public.
protected = public.
for V.M private
class a claas b
private =! private.
public = private.
protected = private.
for V.M protected
class a class b
private =! private.
public = protected.
protected = protected.
(Where V.M= Virtuality Mode)
| Is This Answer Correct ? | 17 Yes | 29 No |
Post New Answer View All Answers
What is the use of this pointer in c++?
Do you know what are pure virtual functions?
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.
What is a rooted hierarchy?
What is the difference between the parameter to a template and the parameter to a function?
When we use Abstract Class and when we use Interface?where we will implement in real time?
Why should you learn c++?
What are different types of loops in c++?
Why struct is used in c++?
What is format for defining a structure?
What are the various access specifiers in c++?
If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?
What is virtual destructor ans explain its use?
Do you know about latest advancements in C++ ?
Can manipulators fall in love?