Standard Library Overview
Every C compiler ships with a standard library — a collection of battle-tested headers that give you input/output, memory management, string handling, math functions, and much more without writing a single line of that logic yourself. Before reaching for a hand-rolled function, it is worth checking whether the standard library already solves the problem: these functions have been optimized, tested, and reviewed for decades across countless platforms, and using them makes your code both shorter and more trustworthy than a fresh reimplementation.
Why the standard library matters
A surprising number of bugs in beginner C code come from reinventing something the standard library already does correctly — a string length counter, a number parser, a sort routine. Knowing what is already available saves time, avoids subtle mistakes (off by one errors, forgetting edge cases like empty strings), and produces code that other C programmers immediately recognize. Each header groups a family of related functionality behind a single #include line.
The major headers at a glance
Header | Provides |
|---|---|
| Standard input/output: |
| General utilities: dynamic memory ( |
| String and raw memory manipulation: |
| Floating-point math: |
| Character classification and conversion: |
| Date and time utilities: |
| Numeric limits of integer types: |
| Numeric limits and precision of floating-point types: |
| The |
| The global |
| A proper |
| Fixed-width integer types ( |
How to use this page
Think of this as a map, not a manual — each header links out to deeper, dedicated pages elsewhere in this section (the math library, the string library, memory functions, and so on) with full worked examples. The goal here is simply to know which door to knock on: when you need to parse a number from a string, you know to look in stdlib.h; when you need a timestamp, you know time.h is the place.