Important changes to the code
The most important thing to note about the code in
Listing 5 is the following:
- The function signature for the function named doubleIt
specifies a return value of type int instead of type void as
was the case in the previous sample programs.
- The code in the function named doubleIt contains a
return statement that was not needed in the previous sample programs.
Otherwise, the program in Listing 5
The screen output produced by the program is
a = 2
a doubled = 4