If two classes are defined “Parent” and “Child” then which is the correct type upcast syntax in C++?
(a) Parent *p=child;
(b) Parent *p=*child;
(c) Parent *p=&child;
(d) Parent *p=Child();
The question was asked by my school principal while I was bunking the class.
My question is from Upcasting topic in portion Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming