adplus-dvertising
frame-decoration

Question

If class C inherits class B and class B inherits class A ________________

a.

Class C object can be upcasted to object of class B only

b.

Class C object can be upcasted to object of class A only

c.

Class C object can be upcasted to object of either class A or B

d.

Class C object can’t be upcasted

Answer: (c).Class C object can be upcasted to object of either class A or B

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. If class C inherits class B and class B inherits class A ________________