A C standard library function is a standardized function available to C programs through a defined interface and semantics. It supplies portable tools for everyday tasks while keeping library implementation separate from the compiler. section 8.0
Calling a library function
#include <stdio.h> int main(void) { puts("ready"); } The header supplies the interface declaration, and puts performs text output. Other familiar library functions include printf and strtod. section 8.0 section 8.1.1
The library groups related functionality behind standard headers:
- stdio.h handles input and output, including text and raw-byte operations. section 8.9
- math.h and tgmath.h support numerical functions, with tgmath.h providing type-generic macros. section 8.9
- ctype.h, stdlib, and string.h support character processing, numerical conversion, and string manipulation. section 8.9
- time.h represents calendar time for human interpretation and physical time in seconds and nanoseconds. section 8.9
Table 8.1 C library headers
| Name | Description | Section |
<assert.h> |
Asserting runtime conditions | 8.8 |
<complex.h> |
Complex numbers | 5.7.8 |
<ctype.h> |
Character classification and conversion | 8.5 |
<errno.h> |
Error codes | 8.1.3 |
<fenv.h> |
Floating-point environment | 15.1.4 |
<float.h> |
Properties of floating-point types | 5.7 |
<inttypes.h> |
Formatting conversion of integer types | 5.7.6 |
<iso646.h> |
Alternative spellings for operators | 4.2 |
<limits.h> |
Properties of integer types | 5.1.3 |
<locale.h> |
Internationalization | 8.7 |
<math.h> |
Type-specific numerical functions | 8.3 |
<setjmp.h> |
Non-local jumps | 19.5 |
<signal.h> |
Signal-handling functions | 19.6 |
<stdalign.h> |
Alignment of objects | 12.7 |
<stdarg.h> |
Functions with varying numbers of arguments | 17.4.2 |
<stdatomic.h> |
Atomic operations | 19.6 |
<stdbit.h> |
Bit operations | 5.7.2 |
<stdbool.h> |
Booleans | 3.1 |
<stdckdint.h> |
Checked integer arithmetic | 8.2 |
<stddef.h> |
Basic types and macros | 5.2 |
<stdint.h> |
Exact-width integer types | 5.7.6 |
<stdio.h> |
Input and output | 8.4 |
<stdlib.h> |
Basic functions | 2 |
<stdnoreturn.h> |
Non-returning functions | 7 |
<string.h> |
String handling | 8.5 |
<tgmath.h> |
Type-generic numerical functions | 8.3 |
<threads.h> |
Threads and control structures | 20 |
<time.h> |
Handling time | 8.6 |
<uchar.h> |
Unicode characters | 14.3 |
<wchar.h> |
Wide strings | 14.3 |
<wctype.h> |
Wide character classification and conversion | 14.3 |
Use the header reference to locate interfaces for assertions, errors, character handling, floating-point properties, atomics, limits, locales, and other standard facilities. section 8.1.1


