Home Segments Index Top Previous Next

365: Sidetrip

You may, if you wish, include parameter names in function prototypes. For example, instead of int rabbits (int); you can write the following:

int rabbits (int n); 

Although parameter names are optional, there are two advantages to including them. First, parameter names often provide a form of documentation; second, if you include parameter names in function prototypes, you can write the function prototype by copying from the function definition, without any error-prone removal of the parameter names.