In C++, which keyword is used to declare an abstract class? 

  • virtual 
  • volatile 
  • pure 
  • abstract
An abstract class in C++ is a class that cannot be instantiated and is meant to be inherited by other classes. It's declared using the virtual keyword, especially when a virtual function is set to 0, making it a pure virtual function, thus making the class abstract.
Add your answer
Loading...

Leave a comment

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