Explain polymorphism? What r the types of polymorphism?
pls give examples?
Answers were Sorted based on User's Feedback
Answer / vikram
Polymorphism literally means taking more than one form or we
can say that one mathod many interface.
there is 2 type of polymarphism 1 :- compail time polimarphism
2: run time polimarphism:
Eax:- function overloding and opertor over loding
Is This Answer Correct ? | 23 Yes | 4 No |
Answer / 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 |
Answer / ajay kanth donkada
Poly as the name states is some thing have more than one
form.
Types are:
Compile Time &
Run time
Example of compile time is Function Overloading/operator
overloading.
Example of Run time: Function overriding.
Is This Answer Correct ? | 6 Yes | 4 No |
Answer / chethan gowda
its a act which allows entities like function, object, etc can have more than one form.....
2 types 1) complile time
2) runtime
Is This Answer Correct ? | 4 Yes | 2 No |
i got a backdoor offer in process global,Bangalore..Can i work with it?
write a program which best describes polymorphism in real world?
2 Answers CTS, Infosys, NexGen,
in the following, A D B G E C F Each of the seven digits from 0,1,2,3,4,5,6,7,8,9 is: a)Represented by a different letter in abov fig: b)Positioned in the fig abov so tht A*B*C,B*G*E,D*E*F are equal. wch does g represents? C
Program to check whether a word is in all capital letters
How to call a non virtual function in the derived class by using base class pointer
#include <stdio.h> #include <alloc.h> #include <stdlib.h> #include <conio.h> 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.
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.
Program to open a file with First argument
What is polymorphism in oop example?
write a programe to calculate the simple intrest and compund intrest using by function overlading
what i oops concept, how many languages supports oops concept?
Program to print 0 to 9 in cross order