What are the different forms of polymorphism??

Answer Posted / mms zubeir

Though there are many answers which are all true to some
extent, I would like to conclude all these into two broad
categories:

1. Ad-hoc polymorphism
2. Parametric polymorphism

As the meaning of the names themselves suggests their usage.

If the range of actual types that can be used is finite
and the combinations must be specified individually prior
to use, it is called Ad-hoc polymorphism.

If all code is written without mention of any specific type
and thus can be used transparently with any number of new
types, it is called parametric polymorphism.

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is overloading in oop?

803


What is abstraction with example?

860


What is difference between multiple inheritance and multilevel inheritance?

923


what are the realtime excercises in C++?

2584


What is the difference between procedural programming and oops?

804


Which is better struts or spring?

840


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

3011


What is the purpose of enum?

798


What is the problem with multiple inheritance?

875


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.

2010


What is a class and object?

825


Why is polymorphism used?

807


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

2021


What is the main feature of oop?

930


What is abstraction example?

872