Functions
Functions
A function is declared with a prototype. The function prototype, which has been seen
in previous lessons, consists of the return type, a function name and a parameter
list. The function prototype is also called the function declaration. Here are some
examples of prototypes.
The function definition consist of the prototype and a function body, which is a block
of code enclosed in parenthesis. A declaration or prototype is a way of telling the
compiler the data types of the any return value and of any parameters, so it can
perform error checking. The definition creates the actual function in memory. Here
are some examples of functions.
void PrintHW()
{
printf("Hello World\n");
}