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 / chetan

it will execute without an error. if Parent class is
parent/base class and child is the child/drive class which
inherit parent class.
In the other worlds you are invoking drive class method with
the reference of base class.

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain sub-type and sub class? atleast u have differ it into 4 points?

2315


What are the important components of cohesion?

1024


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

2386


What is solid in oops?

1121


What is the difference between static polymorphism and dynamic polymorphism?

1086


Why polymorphism is used in oops?

1052


Which is not an object oriented programming language?

985


What does no cap mean?

1064


How can you overcome the diamond problem in inheritance?

1182


Why do we need oop?

1192


What is destructor example?

1043


What are two types of polymorphism?

1075


What is encapsulation with real life example?

1036


What is oops?what is its use in software engineering?

1031


What are different oops concepts?

1060