"Poly" means "many" and "morph" means "form". Polymorphism is the ability of an object (or<br>reference) to assume (be replaced by) or become many different forms of object.<br><br>Example: function overloading, function overriding, virtual functions. Another example can be a plus<br>?+? sign, used for adding two integers or for using it to concatenate two strings.
polymorphism means ability to take more than one form of an object.<br><br>example : polygon.<br>with the same straight lines we can draw octogon,pentagon,hexagon.
"poly" means many & "morph" means form ,i.e. the ability of object which have many forms is called polymorphism. It has two types 1) Run time polymorphism 2) Compile time Polymorphism <br>function overloading, function overriding,operator overloading are the examples of Compile Time & Virtual Function is example of Run time<br>
Polymorphism is the ability to use an operator or function in different ways.Polymorphism refers to codes, operations or objects that behave differently in different contexts.<br><br>Below is a simple example of the above concept of polymorphism:<br><br><br> 6 + 10<br><br><br>The above refers to integer addition.<br><br>The same + operator can be used with different meanings with strings:<br><br><br> "Exforsys" + "Training"<br><br><br>The same + operator can also be used for floating point addition:<br><br><br> 7.15 + 3.78 <br><br>Types of Polymorphism:<br><br>C++ provides three different types of polymorphism.<br><br> * Virtual functions<br> * Function name overloading<br> * Operator overloading<br>
'poly' means 'many' & 'morph' means 'form'.<br>this phenomenon is used when there is a need to redefine an operation.<br>for eg. to add 2 dates...say..25 &15...there is a need of redefinition of '+'<br>eg. function overloading, etc.
Poly means many and morph means form , Polymorphism is the ability to use an operator or function in different way.Single function name can be use to perform different functionality.
Polymorphisam means that in which an object can exhibhit different different behaviour at differnt instances in the program.<br><br>Example:function overloading,operator overloading.
thats came out from greek lang. where poly means many and morph-form. <br>ex:'+' sign for addititon of integer or concatenate the string.<br>live ex:In a cricket playground, where every player perfom different job.
polymorphism is the ability of the data to be prosessed in more than one form.for eg: class demo { float area(float r) { float rad=r; float area=3.14*rad*rad; cout<<area; } void area(float b,float h) { float base=b; float height=h; float area=0.5*base*height; cout<<area; } }; void main() { demo d; float a,b1,c; cout<<"enter the radius"; cin>>a; d.area(a); cout<<"enter height and breadth"; cin>>b1>>c; d.area(b1,c); }