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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / mahen dimri

for V.M public
class a class b
private =! private.
public = public.
protected = protected.

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 ?    23 Yes 41 No

Post New Answer

More C++ General Interview Questions

Write any small program that will compile in "C" but not in "C++"?

4 Answers  


Can a constructor be private?

0 Answers  


What is the main use of c++?

0 Answers  


Write about the role of c++ in the tradeoff of safety vs. Usability?

0 Answers  


What is the v-ptr?

0 Answers  






can output 5 students using one dimensional array

1 Answers   Intel,


When do we use copy constructors?

0 Answers  


Do the names of parameters have to agree in the prototype, definition, and call to the function?

0 Answers  


What are the types of container classes?

0 Answers  


How do you generate a random number in c++?

0 Answers  


What is the function to call to turn an ascii string into a long?

0 Answers  


How the compilers arranges the various sections in the executable image?

1 Answers  


Categories