When declaring a function, which keyword is used to specify that the function should have a default argument?

  • #NAME?
  • const
  • default
  • default_argument
In C++, when declaring a function with default arguments, the = operator followed by a default value is used to specify the default argument. For example, int func(int a, int b = 0) declares a function func with a default argument of 0 for the parameter b.
Add your answer
Loading...

Leave a comment

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