What is the difference between public, private, protected
inheritance?
Answers were Sorted based on User's Feedback
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 |
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 |
How do you flush a buffer in c++?
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
template<class T, class X> class Obj { T my_t; X my_x; public: Obj(T t, X x) : my_t(t), my_x(x) { } }; Referring to the sample code above, which one of the following is a valid conversion operator for the type T? a) T operator T () { return my_t; } b) T operator(T) const { return my_t; } c) operator(T) { return my_t; } d) T operator T (const Obj &obj) { return obj.my_t; } e) operator T () const { return my_t; }
What is the use of default constructor?
What is ios class in c++?
What is the rule of three?
What is iostream in c++ used for?
What is the difference between equal to (==) and assignment operator (=)?
What are exceptions c++?
Is c++ an oop?
what are the iterator and generic algorithms.