Standard Header Files
All function prototypes, macros, and types in the ANSI library are contained in one or more of the following standard header files:
assert.h |
inttypes.h(*) |
signal.h |
stdlib.h |
complex.h(*) |
iso646.h(*) |
stdarg.h |
string.h |
ctype.h |
limits.h |
stdbool.h(*) |
tgmath.h(*) |
errno.h |
locale.h |
stddef.h |
time.h |
fenv.h(*) |
math.h |
stdint.h(*) |
wchar.h(*) |
float.h |
setjmp.h |
stdio.h |
wctype.h(*) |
Because a standard “function” may also be implemented as a macro, your source files should contain no other declaration of a function once the appropriate header file has been included.
Table 1-22 describes some commonly used types. The table also lists which header files define each type.
|
Type |
Purpose |
Header files |
size_t |
Used to express the size of an object as a number of bytes (generally
equivalent to |
stddef.h, stdio.h |
wchar_t |
Used to hold multi-byte character codes, and large enough to represent the codes of all extended character sets |
stdlib.h, wchar.h(*) |
wint_t(*) |
An integer type used to represent wide characters, including the macro WEOF |
wchar.h(*) |
ptrdiff_t |
Used to represent the difference of two pointers (usually equivalent
to |
stddef.h |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access