If Two Classes Are Defined Parent And Child Then Which Is The #1229
If two classes are defined “Parent” and “Child” then which is the correct type upcast syntax in C++?
This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 Default Arguments vs Overloading, Upcasting and Downcasting - OOPs MCQ: Upcasting - Quiz No.2.
If two classes are defined “Parent” and “Child” then which is the correct type upcast syntax in C++?
Parent *p=child;
Parent *p=*child;
Parent *p=&child;
Parent *p=Child();