// the difference between arguments and parameters // for predefined functions #include // function prototype float half_of (float); // main() function void main(void) { float x = 3.5, y = 65.11, z; // In this call, x is the argument to half_of(). z = half_of(x); printf("The function call statement is z = half_of(x)\n"); printf("where x = 3.5 and y = 65.11\n\n"); printf("Passing argument x\n"); printf("The value of z = %f \n", z); // In this call, y is the argument to half_of() z = half_of(y); printf("\nPassing argument y\n"); printf("The value of z = %f \n\n", z); } // function definition, must receive one float value that will be placed in // k and must return a float value back to the caller float half_of(float k) { // k is the parameter, a placeholder. Each time half_of() is called, // k may has different value that was passed as an argument. return (k/2); }