what is virtual function?
Answer Posted / aarti ashar
A virtual function is a function member of a class,
declared using the "virtual" keyword. A pointer to a
derived class object may be assigned to a base class
pointer, and a virtual function called through the pointer.
If the function is virtual and occurs both in the base
class and in derived classes, then the right function will
be picked up based on what the base class pointer "really"
points at.
| Is This Answer Correct ? | 25 Yes | 6 No |
Post New Answer View All Answers
What is difference between pop and oop?
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
Can you explain polymorphism?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What is encapsulation example?
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
What is the difference between a constructor and a destructor?
Why it is called runtime polymorphism?
Can you inherit a private class?
i got a backdoor offer in process global,Bangalore..Can i work with it?
Which type does string inherit from?
What is the point of polymorphism?
Advantage and disadvantage of routing in telecom sector
Why is polymorphism important in oop?