Function Prototypes
Consider the following function, which adds two double precision floating
point numbers:
double sum(double x, double y)
{
return(x + y);
}
For this assignment, create a file containing this function definition,
and a second file with
a program which calls the sum function using two integer
arguments, and which prints the value returned by sum. Compile and
run the program twice, first declaring sum as
double sum();
and then using a function prototype, like
double sum(double,double);
Does the value printed by the program when you use the first declaration
agree with the value when you use the function prototype? Explain why or why
not.