Passing parameters by value

Listing 3 contains a program that illustrates passing two parameters of different types to a function by value.