C
A general-purpose, statically typed, imperative systems programming language standardised by ISO/IEC since 1990. Forms the basis of operating-system kernels, language interpreters, embedded firmware, and the C application binary interface adopted by most other programming languages.
- Paradigms
- imperative
- Typing
- static
- Memory
- manual
- Version
- C23
- First released
- 1972
C is a general-purpose, statically typed, imperative programming language standardised by ISO/IEC since 1990. The language defines a small grammar and a deliberately constrained standard library covering input and output, string manipulation, mathematics, and a limited set of utilities. The specification has been revised on a roughly decennial cadence, though the core syntax and semantics have remained stable since the original ANSI standard of 1989. A C program is translated to native machine code by a compiler and linker; the runtime model includes neither a virtual machine, a garbage collector, nor an exception mechanism. Memory management, error propagation, and synchronisation are the responsibility of the program. The language exposes the underlying machine through a minimal abstraction layer, producing compact and predictable code at the cost of placing significant correctness obligations on the programmer.
History
C was developed by Dennis Ritchie at Bell Laboratories between 1969 and 1973, derived from an earlier language, B, designed by Ken Thompson. The first comprehensive description of the language was published in 1978 as The C Programming Language by Brian Kernighan and Dennis Ritchie, commonly referred to as K&R; the conventions established there remain widely observed. ANSI standardised the language in 1989 as X3.159-1989, and ISO ratified the same specification the following year as ISO/IEC 9899:1990, frequently designated C90. Subsequent revisions have been incremental: C99 (ISO/IEC 9899:1999) introduced single-line comments, fixed-width integer types, and a Boolean type; C11 (ISO/IEC 9899:2011) added optional thread support and generic selection via _Generic; C17 (ISO/IEC 9899:2018) was primarily a defect-correction release; C23 (ISO/IEC 9899:2024) introduced nullptr, promoted bool and true to keywords, and standardised an attribute syntax. Programs written against C89 generally remain compilable under contemporary conforming compilers, a property uncommon among programming languages of comparable age.
Hello world
#include <stdio.h>
int main(void) {
printf("Hello, world!\n");
return 0;
}
Compilation and execution with a conventional toolchain:
cc hello.c -o hello && ./hello
The identifier cc is a conventional alias for the system’s default C compiler — typically gcc on Linux distributions, clang on macOS and the BSDs, and cl.exe, under a distinct command-line interface, on Windows. The C standard does not prescribe a build system; for a program consisting of a single translation unit, the invocation above is sufficient.