Declarations

A declaration determines the interpretation and properties of one or more identifiers. A declaration that allocates storage space for an object or a function is a definition. In C, an object is a data storage region that contains constant or variable values. The term “object” is thus somewhat more general than the term “variable.”

In the source file, declarations can appear at the beginning of a block, such as a function block, or outside of all functions. Declarations that do not allocate storage space, such as function prototypes or type definitions, are normally placed in a header file.

ANSI C99 allows declarations and statements to appear in any order within a block.

Get C Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.