A function in C can perform a particular task, and supports the concept of modular programming design techniques. We have already been exposed to functions. The main body of a C program, identified by the keyword main , and enclosed by the left and right braces is a function. It is called by the operating system when the program is loaded, and when terminated, returns to the operating system.
Functions have a basic structure.
ANSI C varies slightly in the way that functions are declared. This permits type checking by utilizing function prototypes to inform the compiler of the type and number of parameters a function accepts. When calling a function, this information is used to perform type and parameter checking. No arguments are accepted by the function, this is indicated by the keyword void in the accepted parameter section of the function declaration. Copyright B Brown.