-2

I have come across this virtual Keyword in C programming, but actually how it will helpful for the programmers.

1 Answers1

11

Since your question is tagged with the C language, maybe you're confused.

The word virtual is not a keyword in C. It is a keyword in C++, but it is not part of the C language at all -- not even a reserved word. You can use it as an identifier if you like. But don't, because you will limit your program's ability to be ported to C++.

In C++ it is used to declare a class member function that is polymorphic.

paddy
  • 60,864
  • 6
  • 61
  • 103