Why C Still Rules: A Deep Dive into Its History, Evolution, and Legacy
This article chronicles the origins and development of the C programming language, profiles its creators, examines its ancestors BCPL and B, explores early compiler construction, compares language features, showcases classic code examples, and highlights the enduring relevance of C in modern systems and libraries.
History of C
The C programming language was created by Dennis Ritchie at Bell Labs in the early 1970s to provide a portable, high‑level language for the Unix operating system. Ritchie worked together with Ken Thompson, who had previously developed the B language from Martin Richards’s BCPL.
Ritchie’s personal Bell Labs homepage:
https://www.bell-labs.com/usr/dmr/www/index.htmlAncestors of C
BCPL (Martin Richards, 1967) and its derivative B (Ken Thompson, 1969) are the direct precursors of C. BCPL introduced a typeless, block‑structured syntax; B stripped it down to fit the limited memory of early PDP‑7 and PDP‑11 machines. Ritchie extended B with a character type, explicit type declarations, and other features, producing the language later named C.
Timeline of C and Unix
1971 – Ritchie adds a character type to B (called “NB” for new B) and rewrites the compiler to generate PDP‑11 code. By early 1973 the essential features of modern C were complete, allowing the Unix kernel to be rewritten in C for the PDP‑11 (Unix V3). The close coupling of C and Unix accelerated the spread of both.
Bootstrapping the First C Compiler
The original compiler was built by a self‑bootstrapping process:
Write a tiny subset of C (C0) directly in assembly.
Use the C0 compiler to implement a slightly larger subset (C1).
Iteratively extend the language (C2 … CN) until a full C compiler is obtained.
Diagram of the bootstrapping stages (original illustration omitted for brevity).
Source archive of the early compiler:
http://minnie.tuhs.org/Archive/Applications/Early_C_Compilers/last1120c.tar.gzSample Programs in BCPL, B, and C
BCPL
GET "libhdr"
LET start() = VALOF {
LET a, b, c = 1, 2, 3
sum := a + b + c
writen(sum)
}B
main() {
auto a, b, c, sum;
a = 1; b = 2; c = 3;
sum = a+b+c;
putnumb(sum);
}C
#include <stdio.h>
void main(){
int a,b,c,sum;
a=1; b=2; c=3;
sum = a+b+c;
printf("%d", sum);
}Key syntactic differences:
BCPL uses := for assignment; B adopts =; C uses = with explicit types.
B requires the auto keyword for local variables; C introduces static type declarations.
C adds the logical operators && and ||, while ++/-- were introduced earlier by Thompson.
Standard C Library Evolution
ANSI C defined 15 header files. The 1995 NA1 amendment added iso646.h, wchar.h, and wctype.h. C99 introduced six more ( complex.h, fenv.h, inttypes.h, stdbool.h, stdint.h, tgmath.h). C11 added five ( stdalign.h, stdatomic.h, stdnoreturn.h, threads.h, uchar.h). The current standard library therefore contains 29 headers.
Linux Kernel String Functions (kernel 4.18.13)
// SPDX-License-Identifier: GPL-2.0
/*
* linux/lib/string.c
* Copyright (C) 1991, 1992 Linus Torvalds
*/
char *strcpy(char *dest, const char *src)
{
char *tmp = dest;
while ((*dest++ = *src++) != '\0')
/* nothing */;
return tmp;
}
EXPORT_SYMBOL(strcpy);
char *strncpy(char *dest, const char *src, size_t count)
{
char *tmp = dest;
while (count) {
if ((*tmp = *src) != 0)
src++;
tmp++;
count--;
}
return dest;
}
EXPORT_SYMBOL(strncpy);
char *strncat(char *dest, const char *src, size_t count)
{
char *tmp = dest;
while (*dest)
dest++;
while ((*dest++ = *src++) != 0) {
if (--count == 0) {
*dest = '\0';
break;
}
}
return tmp;
}
EXPORT_SYMBOL(strncat);Conclusion
Because C maps closely to machine instructions while providing high‑level abstractions, it remains indispensable for system programming on von Neumann architectures. Its portability, performance, and the extensive ecosystem of compilers and libraries ensure that C will continue to be a foundational language for decades to come.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
dbaplus Community
Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
