what is runtime polymorphism? For the 5 marks.
Answers were Sorted based on User's Feedback
Answer / kanan
Run time polymorphism means, compiler would comes to know
which method to execute, at the run time not in compile time.
Example is
-Interface
-Abstract Methods
-Virtual Functions
| Is This Answer Correct ? | 11 Yes | 0 No |
Answer / mayank kumar
run time polymorphism is also called late binding
polymorphism. it uses the concept of pointer.
e.g,
function overloading
operator overloading
constructor overloading
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / karthika
By the name denotes it allocate memory at the run time.
It is done by using virtual function and inheritance.
It uses pointer since it is executed at run time.it create
reference for the base class.so it takes many forms for the
same object.
eg method overiding.
| Is This Answer Correct ? | 1 Yes | 0 No |
Program to open a file with First argument
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
Write a program to get the binary tree.
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <conio.h> 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
What is object-oriented programming? Webopedia definition
What is polymorphism and example?
What is a class?
32 Answers Infosys, TCS, Thylak,
What is Object and Class? What are the differences between them?
i ahve v low % in 12th n BSC which is aroun 50 coz science was imposed on me......nw m doin MCA n my aggregate in above 74%,what shud i say if asked about low previous percentage??????
What is an advantage of polymorphism?
for example A,B,C,D are class all the 4 class contain one method who() but the method who() implementaion is differnet among each class. the relation among the 4 class are A is base class and is inherited by B and C.and from this two B and C where D is inherited. the question is i want to display the output who() method in all the classes(A,B,C,D)the output of who() method is diferrent amond all the class(A,B,C,D) ------A------ virtuval who(print a) override | | who(print b) B C override who(print c) | | -------D------ override who(print d)
What is difference between pop and oop?