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

What are different oops concepts?

564


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

1932


Why is oop better than procedural?

596


What are the 3 pillars of oop?

607


2. Give the different notations for the class.\

1577






What is oops in simple words?

571


Can we define a class within the interface?

544


What is polymorphism in oops?

550


What is object and example?

594


What is purpose of inheritance?

636


what are the different types of qualifier in java?

1830


Do you know about multiple inheritance?

632


Is oop better than procedural?

559


What do you mean by variable?

565


What is oops concept with example?

570