Explain polymorphism? What r the types of polymorphism?
pls give examples?

Answer Posted / vadivel

Right answer is,

Polymorphrism means the "Many forms", is feature that
allows one interface to be used for a general class of
actions. The specifc action is determined by the nature of
the situation.

Two types of polymorphrism, 1. Compile time
(Operator/Functional overloading) [Language 'C' supported
polymorphrism]. 2. Run time (Virtual function).

Example:
//function prototype
int Addition(int iOperand1, int iOperand2);
float Addition(float fOperand1, float fOperand2);
float Addition(int iOperand1, float fOperand2);

Is This Answer Correct ?    17 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the oops and benefits of oops programming?

725


What is difference between polymorphism and inheritance?

800


What is the renewal class?

2401


How oops is better than procedural?

811


What is difference between data abstraction and encapsulation?

824


What is encapsulation in simple terms?

753


What is encapsulation c#?

799


What is encapsulation oop?

786


What is encapsulation with example?

779


What is the difference between encapsulation and polymorphism?

814


Why is it so that we can have virtual constructors but we cannot have virtual destructors?

4308


What do you mean by abstraction?

802


Write a c++ program to display pass and fail for three student using static member function

3073


What are the benefits of interface?

793


What is destructor give example?

803