Which keyword is used to inherit a class in C++? 

  • import 
  • extend 
  • inherit 
  • public
In C++, inheritance is specified by placing the colon (:) followed by an access specifier (public, protected, or private) and then the name of the base class. The public keyword itself is not used for inheritance, but rather indicates the type of inheritance.
Add your answer
Loading...

Leave a comment

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