Chapter 6 Functions

The function is the fundamental modular unit in C. A function is usually designed to perform a specific task, and its name often reflects that task. A function contains declarations and statements. This chapter describes how to declare, define, and call C functions. Other topics discussed are:

Function attributes such as __near and __far

Calling conventions such as __cdecl, __pascal, and __fortran

Export, inline, and interrupt functions

Storage classes for functions

Return types

Function arguments and parameters

Function declarations are also discussed in Chapter 3, “Declarations and Types.”