In C++, to ensure that a derived class does not override a method of a base class, the method in the base class should be declared as _______. 

  • final 
  • constant 
  • private 
  • static
In C++, when a base class wants to prevent its method from being overridden in the derived classes, it declares that method as final. This ensures that the method retains its original functionality without any modifications.
Add your answer
Loading...

Leave a comment

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