Standard C++ Library Reference ISO/IEC (VERSION3)

Next
C Library Overview
Using Standard C Headers · C Library Conventions · Program Startup and Termination
All Standard C library entities are declared or defined in one or more standard headers. To
make use of a library entity in a program, write an include directive that names the relevant
standard header. The full set of Standard C headers constitutes a hosted implementation:
<assert.h>, <ctype.h>, <errno.h>, <float.h>, <iso646.h>, <limits.h>,
<locale.h>, <math.h>, <setjmp.h>, <signal.h>, <stdarg.h>, <stddef.h>,
<stdio.h>, <stdlib.h>, <string.h>, <time.h>, <wchar.h>, and <wctype.h>.
The headers <iso646.h>, <wchar.h>, and <wctype.h> are added with Amendment 1,
an addition to the C Standard published in 1995.
Still more headers (not described here), and changes to existing headers, are added with C99, a
revision to the C Standard published in 1999.
A freestanding implementation of Standard C provides only a subset of these standard
headers: <float.h>, <iso646.h>, <limits.h>, <stdarg.h>, and <stddef.h>.
Each freestanding implementation defines:
how it starts the program
what happens when the program terminates
what library functions (if any) it provides
Using Standard C Headers
You include the contents of a standard header by naming it in an include directive, as in:
#include <stdio.h> /* include I/O facilities */
You can include the standard headers in any order, a standard header more than once, or two or
more standard headers that define the same macro or the same type. Do not include a standard
header within a declaration. Do not define macros that have the same names as keywords before
you include a standard header.
A standard header never includes another standard header. A standard header declares or
defines only the entities described for it in this document.
Every function in the library is declared in a standard header. The standard header can also
provide a masking macro, with the same name as the function, that masks the function