C is a general-purpose systems programming language created by Dennis Ritchie at Bell Telephone Laboratories, developed mainly between 1971 and 1973, with 1972 the year most often cited. It was built to write the Unix operating system and remains the foundation of operating systems, compilers, databases and embedded firmware. Asking why Dennis Ritchie created C at Bell Labs leads straight to a specific machine, the DEC PDP-11, and a specific problem: B could not use it well.
Why Dennis Ritchie created C at Bell Labs
Ken Thompson had written the first Unix in assembly on a PDP-7 in 1969, and then created B, a typeless language derived from BCPL. When Unix moved to the PDP-11 in 1970–71, B's limits showed:
- The PDP-11 addressed individual bytes, but B knew only machine words, so handling characters was clumsy.
- Floating-point hardware was coming, and B had no way to describe floating-point values.
- B compiled to slow threaded code rather than native instructions.
Ritchie added a type system, first in a stage he called "New B", and then in C, with char, int, pointers to each, arrays and, soon after, struct. The compiler generated efficient PDP-11 code. In 1973 the Unix kernel was rewritten in C, which was unusual at the time: operating systems were expected to be written in assembly. Having Unix in C made it portable, and that portability is what spread both Unix and C around the world.
Design and key features
- Close to the machine. Pointers, pointer arithmetic and bitwise operators map almost directly to hardware instructions.
- Small core, big library. Input and output, strings and memory management live in the standard library, not in the language.
- Arrays and pointers. An array name usually converts to a pointer to its first element, a legacy of BCPL and B.
- The preprocessor.
#include,#defineand conditional compilation handle headers, constants and platform differences. - Static but weak typing. Types are checked at compile time, but casts and implicit conversions are easy, which gives control and also plenty of ways to make mistakes.
A short C example
#include <stdio.h>
size_t my_strlen(const char *s)
{
const char *p = s;
while (*p != '\0')
p++;
return (size_t)(p - s);
}
int main(void)
{
printf("%zu\n", my_strlen("Bell Labs"));
return 0;
}
This prints 9. It shows the C way of thinking: a string is just bytes ending in a zero byte, and you walk through memory with a pointer.
Versions and standards
| Year | Version | Notes |
|---|---|---|
| 1978 | K&R C | The C Programming Language by Brian Kernighan and Dennis Ritchie |
| 1989/1990 | C89 / C90 | ANSI X3.159-1989, then ISO/IEC 9899:1990; function prototypes |
| 1999 | C99 | // comments, long long, stdint.h, variable-length arrays |
| 2011 | C11 | Threads, atomics, _Generic |
| 2018 | C17 | Bug-fix revision |
| 2024 | C23 | nullptr, constexpr, typeof, bool as a keyword |
The K&R book also popularised the "hello, world" program, which Kernighan had first used in a B tutorial.
Notable software written in C
A short list gives the scale: Unix and its descendants, the Linux kernel, much of the Windows and macOS kernels, the CPython interpreter, SQLite, PostgreSQL, Git, Redis and countless firmware images in routers, cars and appliances. When another language needs to call the operating system, it usually goes through a C interface.
Influence and legacy
C's syntax, with braces, semicolons, for loops and ++, became the default look of programming. C++ and Objective-C extended it directly; Java, C#, JavaScript, Go, PHP and Perl borrowed its syntax. Ritchie and Thompson received the ACM Turing Award in 1983 for their work on Unix. Ritchie died in October 2011.
Is C still used today?
Very much so. C is still a top choice for operating systems, embedded systems, device drivers and performance-critical libraries, and it is supported on practically every processor ever made. Memory safety is its big weakness, and newer languages such as Rust are taking over some new systems work. Still, the reasons why Dennis Ritchie created C at Bell Labs, efficiency, portability and direct control of hardware, are exactly why C remains in daily use more than fifty years later.
Frequently asked questions
Why is it called the C programming language?
C came after B, which Ken Thompson had derived from BCPL. Ritchie named the new language the next letter. There was later some joking about whether the successor should be called D or P, after the next letter in BCPL.
Was Unix originally written in C?
No. The first Unix was written in assembly for the PDP-7 in 1969. The kernel was rewritten in C in 1973, for the PDP-11, which made Unix one of the first operating systems written mostly in a high-level language.
Is C still worth learning in 2026?
Yes, especially for embedded systems, operating systems and anyone who wants to understand how computers manage memory. C knowledge also makes C++, Rust and Go easier to learn. Even if you never write C professionally, reading it is a useful skill.







