Default Arguments

C++ provides the ability to supply a default value for an argument to a function. Now when a function is called, a programmer has the option of either using the default value or supplying their own value to use.

To use the default value, the function will be called without supplying an argument.

Function Prototype:   return_type func_name(arg_type = default_value);
                             
Function Header:      return_type func_name(arg_type arg_name)

Function Calls:       func_name();      //default value is used

                      func_name(arg1);  //value in arg1 is used

NOTES: