/* Test of the five() function */ #include #include /* because we call sqrt() later */ int five (void) { return 5; } main () { int i; /* Assign a function result to a variable */ i = five(); /* check */ printf("i should be five: %d\n", i); /* Include a function result in an expression */ printf("25 is %d\n", 4 * five() + 10 - five() ); /* compare a function result */ if (five() == 5) { printf("five() is returning 5 correctly.\n"); } /* function in a function call in a function call... */ printf("Square root of 5 is %f\n", sqrt(five())); /* Throw away a function result */ five(); printf("Where did it go??\n"); }