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...

for example A,B,C,D are class all the 4 class contain one
method who() but the method who() implementaion is differnet
among each class. the relation among the 4 class are
A is base class and is inherited by B and C.and from this
two B and C where D is inherited.
the question is i want to display the output who() method in
all the classes(A,B,C,D)the output of who() method is
diferrent amond all the class(A,B,C,D)
------A------ virtuval who(print a)
override | |
who(print b) B C override who(print c)
| |
-------D------ override who(print d)

Answer Posted / ana

only pure virtual function cant be executed, so A.who() can
be executed
and since you override who() in B, C and D, the output is
different

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is object in oops?

1125


Where You Can Use Interface in your Project

1939


How do you achieve polymorphism?

1135


Write a program to sort the number with different sorts in one program ??

2430


What are the 4 main oop principles?

1267


What is object in oop?

1170


What is ambiguity in inheritance?

1172


Why is oop better than procedural?

1145


What does it mean when someone says I oop?

1123


What is overloading in oops?

1213


write a programe to calculate the simple intrest and compund intrest using by function overlading

2260


What is multilevel inheritance?

1257


c++ program to swap the objects of two different classes

2474


what is the sylabus for priliminaries?

2225


What is encapsulation with real life example?

1088