When we declare a function prototype that takes parameters, we also declare those parameters as formal parameters. Formal parameters have no value, only a type and, optionally, a name. However, when we call the function, we supply the actual parameters, which are the values that are copied into those placeholder parameters.
Consider theprintDistance()function declaration and definition in the following program:
void printDistance( double );
int main( void )
double feet = 5280.0;
printDistance( feet );
printf( "feet = %12.3g\n" , feet );
// Given feet, print the distance in feet and yards.
void printDistance( double f )
printf( "The distance in feet is %12.3g\n" , f );
f = f / 3.0 ;
printf( "The distance in yards is %12.3g\n" , f );
In this function, we focus on the assignment that occurs between the function call and the execution...