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
Why do we use class?
Why do we use polymorphism in oops?
Why is object oriented programming so hard?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
How do you define a class in oop?
What is abstraction and encapsulation?
Is abstract thinking intelligence?
Why it is called runtime polymorphism?
Can main method override?
What is the purpose of enum?
Why is oop useful?
What is polymorphism what is it for and how is it used?
Which method cannot be overridden?
What is the highest level of cohesion?
What are the types of abstraction?