Child cObj = new Parent()
Wahts the output ?
Answer Posted / donga bangarraju
sorry for the earlier post, this output is giving error like
initializing cannot convert to Paretn* to Child*, if u want
correct this code write like this, this is downcasting or
using RTTI mechanism in C++;
Parent* p =new Child;
Child* obj= dynamic_cast<Child*>(p);
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
what type of questions
What is this pointer in oop?
Why do we use class in oops?
What are the benefits of polymorphism?
Prepare me a program for the animation of train
What is encapsulation c#?
What is oops and its features?
what is the drawback of classical methods in oops?
What is the important feature of inheritance?
Please send ford technologies placement paper 2 my mail id
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
What is multilevel inheritance explain with example?
What is an example of genetic polymorphism?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
How does polymorphism work?