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

What is static function and static class?

4 Answers   HCL,


Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

0 Answers  


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

0 Answers  


explain the reference variable in c++?

0 Answers  


sizeof- is it functioning statically or dynamically?

2 Answers  






what are the iterator and generic algorithms.

0 Answers  


What is private, public and protected inheritance?

0 Answers  


Can you please explain the difference between using macro and inline functions?

0 Answers  


What is the difference between public, private, and protected access?

0 Answers  


what is object?

7 Answers  


Write a program to find the Fibonacci series recursively.

0 Answers   Huawei,


How can we access protected and private members of a class?

0 Answers  


Categories