The C standard library is the standardized collection of functions, macros, and types that supplies portable interfaces for everyday programming. It complements the C language with tools for mathematics, files, strings, time, runtime access, and program termination. section 8.0
Its interfaces organize common programming tasks into related areas:
- Mathematical functions support numerical work, preferably through type-generic macros from tgmath.h. section 8.8
- Input and output use stdio.h for text, formatted data, and raw bytes. section 8.8
- String processing combines character classification, numerical conversion, and string manipulation through ctype.h, stdlib, and string.h. section 8.8
- Time, environment access, and termination are handled through time.h, getenv, locale.h, and related interfaces. section 8.0 section 8.8
Separating formatting from output
printf combines formatting with output. snprintf can perform the formatting into a string, which puts can then print, making the two responsibilities visible as separate operations. section 8.1
Clear interfaces and semantics promote portability and can separate compiler implementations from library implementations. Later interfaces depend more heavily on pointers, especially for formatted input, extended character sets, binary streams, and error handling. section 8.0 section 14.0


