The _______ keyword is used when we want to explicitly pass by reference but prevent the function from modifying the argument. 

  • const 
  • static 
  • virtual 
  • inline
The const keyword is used in C++ to indicate that a value shouldn't be modified. When passing an argument by reference, using const before the parameter type ensures that the function does not alter the original data, providing a level of safety.
Add your answer
Loading...

Leave a comment

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