← Quiz: Type Casting in C++: all 10 questions
Quiz: Type Casting in C++ · Question 8 of 10
What does an upcast mean?
What does an upcast mean?
- A.Converting a derived-class pointer to a base-class pointer
- B.Converting a base-class pointer to a derived-class pointer
- C.Converting int to long long
- D.Removing const from a pointer
Answer & explanation
Correct answer: Converting a derived-class pointer to a base-class pointer
Upcasting moves up the inheritance tree and is always safe, so it happens implicitly.
Can you get the rest right without peeking?
Take the timed Quiz: Type Casting in C++ quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →