Answer Posted / d n gavade
There are two type of polymorphism i.e.
static(compiplation time) and
Dynamic Polymorphism(Run Time).
In case of Static,
derived class,Base class have same funcion name,the base
class function will be called.
In Case of Dynamic Polymorphism,we can use virtual keyword
in base class function and passing reference of derived
class to the base class pointer, we can call the derived
class function which is override.
| Is This Answer Correct ? | 30 Yes | 2 No |
Post New Answer View All Answers
Can we create object of abstract class?
Why interface is used?
How does polymorphism work?
Why it is called runtime polymorphism?
What is oops and why we use oops?
What is difference between oop and pop?
What is polymorphism oop?
What is inheritance in oop?
How can you overcome the diamond problem in inheritance?
Can destructor be overloaded?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
What is polymorphism and why is it important?
Can we have inheritance without polymorphism?