The syntax to declare a pure virtual function is to follow the function declaration with _______. 

  • '= 0' 
  • 'virtual' 
  • 'override' 
  • '= 1'
In C++, a pure virtual function is declared by assigning 0 in its declaration. The syntax is virtual function_name() = 0;. It indicates that the function doesn't have a body in this class and must be implemented in any non-abstract derived class.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *