What is virtual Function.

Answer Posted / poonam

Virtual function is a function that uses keyword "virtual"
with the datatype of the function. When the base class as
well as the derived class contains a function both having
the same name, just to resolve ambiguity and copy of the
same data again and again we use the keyword "virtual"
preeceeding it. It is used to achieve poymorphism.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write knight tour problem which is present in datastructure

2172


What is object in oops?

621


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1424


What is constructor in oop?

593


What is the point of polymorphism?

598






What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2114


How to hide the base class functionality in Inheritance?

650


What are the 4 pillars of oop?

678


What is difference between inheritance and polymorphism?

579


What is encapsulation example?

557


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

1647


What is a null tree?

638


I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...

1636


Why is polymorphism important in oop?

643


How do you define social class?

611