Shanil P.

asked • 10/15/20

Lab for CS112 Data Structures and Algorithms

Answer this and please explain so that it is easy to understand the following questions and the explanation given.


Suppose the class D inherits from B. Which of the following assignments are legal?

B b;

D d;

B* pb;

D* pd;


a) b = d;

b) d = b;

c) pd = pb;

d) pb = pd;

e) d = pd;

f) b = *pd;

g) *pd = *pb;



1 Expert Answer

By:

Patrick B. answered • 10/15/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.