Hiding Details

The following is an example of a function used to hide details. Functions used for this purpose are not generally reuseable but do improve the reability of your program by hiding more complex print structures or calculations. PrintGreeting() in Project 1 is an example of a function whose purpose is to hide details.

void PrintAnswer (float result) { printf ("The result was %f.\n", result); return; }


Main Page
Last Modified 3 October 2000