Child cObj = new Parent()
Wahts the output ?

Answer Posted / giri

You can write below ways [Upcasting].

Child *cObj = new Parent();

Is This Answer Correct ?    5 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to call a non virtual function in the derived class by using base class pointer

5247


What does <> mean pseudocode?

618


What is the significance of classes in oop?

585


write string class as your own class in java without using any built-in function

1974


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6137






Why do we use oop?

598


What is stream in oop?

835


What are main features of oop?

629


What is constructor in oop?

581


What is encapsulation with example?

574


What is an example of genetic polymorphism?

645


Why multiple inheritance is not allowed?

581


Why multiple inheritance is not possible?

594


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1535


What are the data types in oop?

600