adplus-dvertising
frame-decoration

Question

What is upcasting?

a.

Casting subtype to supertype

b.

Casting super type to subtype

c.

Casting subtype to super type and vice versa

d.

Casting anytype to any other type

Answer: (a).Casting subtype to supertype

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is upcasting?

Similar Questions

Discover Related MCQs

Q. Which among the following is true for upcasting in inheritance?

Q. Which among the following is safe?

Q. Which among the following is best situation to use upcasting?

Q. Which property is shown most when upcasting is used?

Q. Upcasting and downcasting objects is same as casting primitive types.

Q. If multiple inheritance is implemented, which upcasting will be correct?

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

Q. Upcasting is _____________________ without an explicit type cast.

Q. Which concept is needed because of implicit type casting use?

Q. When are the pointer types known for upcasting the objects?

Q. When are the object type known for upcasting the objects?

Q. If two classes are defined “Parent” and “Child” then which is the correct type upcast syntax in C++?

Q. What is downcasting?

Q. Which among the following is a mandatory condition for downcasting?

Q. Downcasting is _______________________

Q. Downcasting ____________________

Q. What should be used for safe downcast?

Q. What does dynamic_cast return after successful type casting?

Q. If dynamic_cast fails, which value is returned?

Q. Which is the proper syntax of dynamic_cast?