InterviewSolution
Saved Bookmarks
| 1. |
Which type of function among the following shows polymorphism?(a) Inline function(b) Virtual function(c) Undefined functions(d) Class member functionsThis question was posed to me by my college professor while I was bunking the class.The origin of the question is Polymorphism in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» RIGHT CHOICE is (b) VIRTUAL function The best explanation: Only virtual functions among these can show polymorphism. Class MEMBER functions can show polymorphism too but we should be sure that the same function is being overloaded or is a function of abstract class or something LIKE this, since we are not sure about all these, we can’t say whether it can show polymorphism or not. |
|