c/language/functions

A function is a C language construct that associates a (the function body) with an  (the function name). Every C program begins execution from the, which either terminates, or invokes other, user-defined or library functions.

Functions may accept zero or more parameters, which are initialized from the arguments of a, and may return a value to its caller by means of the.

The body of a function is provided in a. Each function that is used in an expression (unless ) must be  in a program.

There are no nested functions (except where allowed through non-standard compiler extensions): each function definition must appear at file scope, and functions have no access to the local variables from the caller: