skip to content
Ivan's wiki
Site Tools
Search
Tools
Show pagesource
Backlinks
Recent Changes
Media Manager
Sitemap
>
Recent Changes
Media Manager
Sitemap
c-standard-library
This page is read only. You can view the source, but not change it.
# C standard library **[C standard library](https://en.cppreference.com/w/c/header)** is the core set of headers and functions always linked into C programs, providing essential utilities like I/O (`<stdio.h>`), memory management (`<stdlib.h>`), string handling (`<string.h>`), and math operations (`<math.h>`). Headers declare functions and constants; the library implementation lives in `libc.so` (dynamic) or `libc.a` (static). Modern C lacks advanced data structures (no maps, vectors, or trees), async/threading, and networking—you must implement these yourself or use external libraries. ## Example This example demonstrates basic C standard library usage with I/O and memory allocation. ```c // compile: gcc -o stdlib stdlib.c // run: ./stdlib // description: use standard library for I/O, memory, and string operations #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char *buffer = malloc(50); if (!buffer) { fprintf(stderr, "Memory allocation failed\n"); return EXIT_FAILURE; } strcpy(buffer, "Hello from stdlib"); printf("%s\n", buffer); free(buffer); return EXIT_SUCCESS; } ```
Page Tools
Show pagesource
Backlinks
Back to top