What is polymorphism? Explain with an example.

Answer Posted / m sajjad

Polymorphism means the same function but have different
tasks Basically polymorphism have combination of two words
"poly" and "morphism" poly means many and morphism means forms
i.e
many things or functions are to be done by only one
int is polymorphism

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are two types of polymorphism?

614


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

1656


What is an advantage of polymorphism?

599


How many human genes are polymorphic?

577


What do you mean by Encapsulation?

645






What is polymorphism and example?

594


What is pointer in oop?

541


What are the important components of cohesion?

557


What are the 4 main oop principles?

685


What is the renewal class?

2171


How to call a non virtual function in the derived class by using base class pointer

5281


What is class encapsulation?

604


#include #include #include #include void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort

2070


What is overloading and its types?

618


What is polymorphism in oop example?

519