Function Declarations and Definitions
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Function Declarations and Definitions.
Function prototypes establish the name of the function, its return type, and the type and number of its formal parameters. A function definition includes the function body.
Both function and variable declarations can appear inside or outside a function definition. Any declaration within a function definition is said to appear at the "internal" or "local" level. A declaration outside all function definitions is said to appear at the "external," "global," or "file scope" level. Variable definitions, like declarations, can appear at the internal level (within a function definition) or at the external level (outside all function definitions). Function definitions always occur at the external level. Function definitions are discussed further in Function Definitions. Function prototypes are covered in Function Prototypes.