Q:

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

0

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


  1. Parent *p=child;
  2. Parent *p=*child;
  3. Parent *p=&child;
  4. Parent *p=Child();

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

(c).Parent *p=&child;

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

OBJECT ORIENTED PROGRAMMING - OVERLOADING MCQ

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What is downcasting?... >>
<< When are the object type known for upcasting the o...