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
What is the real time example of inheritance?
What is polymorphism what is it for and how is it used?
what is the drawback of classical methods in oops?
How do you achieve runtime polymorphism?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What are main features of oop?
How do you achieve polymorphism?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What is oops concept with example?
What is meant by oops concept?
What is pure oop?
How to hide the base class functionality in Inheritance?
What is polymorphism and example?
what is difference between class template and template class?