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 for insertion ,deletion,sorting in double link list
What is difference between polymorphism and inheritance?
What is polymorphism and its types?
why the memory allocated with new cant be freed using free()
What is design patterns in C++?
Why we use classes in oop?
Can we define a class within the interface?
1.explicit call for destructor 2.calling function inside a constructor. 3.base *b-new derived delete b; 4.delete p what it will delete. 5.size of base class and derived class int i,in base class and int j in derived. 6.int i-20 int main() { int i =5; printf("%d".::i); { int i =10; printf("%d".::i); } } 7.object slicing 8.new 9.function overloading(return type). 10.class base() { virtuval fun() { ----- } } class derivied:public base() { fun() { ----- } } int main() { derived d; } 11.how static function will call in C++? 12.default structures are in C++? 13.constructors should be in public . 14.virtuval constructor not exist. 15.multilevel inhritence. destructor order.
string is a class or data type in java?
What is the difference between an object and a class?
to remove the repeated numbers from the given . i.e.., if the input is 12233 output should of 123
What is difference between function overloading and overriding?