Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what type of questions

2179


What is this pointer in oop?

1129


Why do we use class in oops?

1026


What are the benefits of polymorphism?

1366


Prepare me a program for the animation of train

2540


What is encapsulation c#?

1129


What is oops and its features?

1153


what is the drawback of classical methods in oops?

3435


What is the important feature of inheritance?

1192


Please send ford technologies placement paper 2 my mail id

2151


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2686


What is multilevel inheritance explain with example?

1205


What is an example of genetic polymorphism?

1244


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.

2245


How does polymorphism work?

1191