What is polymorphism ? Explain with examples

Answer Posted / nisha

Polymorphism means one name,many properties.Example of
polymorphism is function overloading whare we can have many
functions with same name but having different properties
like the number of arguments in the function header.

Is This Answer Correct ?    43 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to improve object oriented design skills?

569


What is abstraction in oop with example?

644


What is and I oop mean?

618


What is class and object in oops?

609


What is difference between data abstraction and encapsulation?

616






What is encapsulation in oops?

534


What is stream in oop?

838


How is polymorphism achieved?

583


What is multilevel inheritance explain with example?

626


What is a class in oop?

604


What is meant by oops concept?

612


Advantage and disadvantage of routing in telecom sector

786


#include #include #include #include void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.

3248


What is coupling in oop?

598


write knight tour problem which is present in datastructure

2164