C++ Programming and Technical

Using the following declarations, which of the
following assignment statements are legal?
class A {...} ; class B: public A {...};
A a; B b, b1, b2;
a) a = b;
b) b = a;
c) b1 = b2;
d) Both (a) and (b) are legal, but not (c).
e) Both (a) and (c) are legal, but not (b).
f) Both (b) and (c) are legal, but not (a).

Read Solution (Total 1)

C++ Other Question

Suppose that the foo class does not have an
overloaded assignment operator. What happens
when an assignment a=b; is given for two foo
objects?
a) The automatic assignment operator is used
b) The copy constructor is used
c) Compiler error
d) Run-time error
In C++ what does the operator over loading
means.
a) Giving new meaning to existing C++ operators
b) Defining functionality of existing􀀁 C++ operator
for user define objects.
c) Defining new operators.