C began as a tweak to a failed language so two men could rewrite Unix
Half a century after Dennis Ritchie created it at Bell Labs, C still runs underneath much of computing, in operating system kernels, device drivers and tiny embedded chips. It began modestly: Ken Thompson's language B was too slow for a new minicomputer, so Ritchie kept adding features until it became something else.
Thompson and Ritchie first wrote Unix in assembly language on a PDP-7, then moved it to the more capable PDP-11. Thompson wanted a higher-level language for utilities. After abandoning a Fortran compiler, he trimmed down an existing systems language, BCPL, and gave it terser syntax, calling the result B. It could not exploit the PDP-11's ability to address single bytes, and programs ran slowly, so few tools were written in it.
In 1971 Ritchie began extending B, first adding a character type and calling the result New B. Thompson used it for kernel work, and his needs steered its growth. Through 1972 came pointers, arrays of any type and functions returning richer types, plus a new compiler, and the language was renamed C. By Version 4 Unix in November 1973, with structures added, most of the kernel had been rewritten in C, making Unix one of the first operating systems not written in assembly. A preprocessor for including files and defining macros arrived around the same time.
Much of C's appeal lies in what it leaves out. The core language is small, while input, output, string handling and maths live in standard libraries. Pointers give direct access to memory, types map neatly onto machine instructions, and a compiled program demands very little from the platform beneath it. Carefully written code can be recompiled for very different hardware with few changes. The flip side is loose typing and no built-in string type: text is just a run of characters ending in a zero.
In 1978 Brian Kernighan and Ritchie published The C Programming Language, which served as the informal rulebook for years and popularised the hello, world first program now copied in textbooks everywhere. The American National Standards Institute formalised the language in 1989, and since 2000 it has usually ranked first or second in the TIOBE popularity index.
Source: C (programming language)