ZetCode

C tutorials

C is a small, statically typed, compiled language created by Dennis Ritchie at Bell Labs in 1972. It is the language of operating system kernels, language runtimes, database engines and embedded firmware, and its syntax and semantics influence most languages that came after it. A C program is a set of functions that call each other and the standard library, and the compiler translates them into machine instructions ahead of time.

The tutorials in this section start with the first program and the structure of a source file, then cover the types a program can use, arrays and functions, the operators that combine values, the bit-level operations needed for flags and packed data, and the header files that hold a multi-file program together. Every example is a complete program, compiled with an explicit standard and warnings enabled, and the output shown is the output of the real run. The standard library reference below documents one function or one family of functions per page.

C language

These pages cover the language itself, from the first program to the operators that work on individual bits.

C Standard Library

The reference pages describe the headers and functions of the ISO C standard library, with a complete example and its verified output on every page.

last modified November 14, 2026