{
  "id": "c",
  "name": "C",
  "appeared": 1972,
  "creators": [
    "Dennis Ritchie"
  ],
  "type": "systems",
  "status": "stable",
  "tagline": "Programming language for operating systems and other code that has to work close to the hardware.",
  "born_from": "In 1969 Ken Thompson created the B language at Bell Labs, and B had no types. The PDP-11's byte addressing exposed B's limits, so Dennis Ritchie added types, int and char, and wrote C, and in 1973 the Unix kernel was rewritten in it.",
  "reacts_to": [
    "b",
    "bcpl"
  ],
  "tradeoffs": {
    "memory": "manual",
    "types": "static",
    "run": "native",
    "concurrency": [
      "threads"
    ],
    "cost": "No bounds checks and no memory ownership rules, so buffer overflows and use-after-free bugs are the programmer's job, and undefined behaviour often compiles without an error."
  },
  "slots": [
    {
      "slot": "systems",
      "fit": "strong"
    },
    {
      "slot": "embedded",
      "fit": "strong"
    },
    {
      "slot": "server",
      "fit": "ok"
    },
    {
      "slot": "cli",
      "fit": "ok"
    },
    {
      "slot": "wasm",
      "fit": "ok"
    },
    {
      "slot": "browser",
      "fit": "none",
      "note": "Only through WebAssembly, not as a browser language."
    }
  ],
  "won_where": [
    {
      "what": "Linux kernel, which its own documentation says is written in the C programming language",
      "source": "https://docs.kernel.org/process/programming-language.html"
    },
    {
      "what": "Unix, whose kernel was rewritten in C in 1973",
      "source": "https://csapp.cs.cmu.edu/2e/docs/chistory.html"
    }
  ],
  "alternatives": [
    "cpp",
    "rust",
    "zig"
  ],
  "timeline": [
    {
      "year": 1969,
      "what": "Ken Thompson creates the B language at Bell Labs",
      "source": "https://csapp.cs.cmu.edu/2e/docs/chistory.html"
    },
    {
      "year": 1972,
      "what": "Ritchie calls 1972 the most creative period of C's development",
      "source": "https://csapp.cs.cmu.edu/2e/docs/chistory.html"
    },
    {
      "year": 1973,
      "what": "The Unix kernel is rewritten in C for the PDP-11",
      "source": "https://csapp.cs.cmu.edu/2e/docs/chistory.html"
    },
    {
      "year": 1978,
      "what": "Kernighan and Ritchie publish The C Programming Language",
      "source": "https://csapp.cs.cmu.edu/2e/docs/chistory.html"
    },
    {
      "year": 1989,
      "what": "The X3J11 committee finishes its ANSI C standard report",
      "source": "https://csapp.cs.cmu.edu/2e/docs/chistory.html"
    },
    {
      "year": 2024,
      "what": "C23 is adopted as the current ISO standard",
      "source": "https://www.open-std.org/jtc1/sc22/wg14/"
    }
  ],
  "links": {
    "website": "https://www.open-std.org/jtc1/sc22/wg14/"
  },
  "pldb": "c",
  "sources": [
    "https://csapp.cs.cmu.edu/2e/docs/chistory.html",
    "https://docs.kernel.org/process/programming-language.html",
    "https://www.open-std.org/jtc1/sc22/wg14/",
    "https://pldb.io/concepts/c.html"
  ],
  "verified": false,
  "last_reviewed": "2026-10-30",
  "prose": "## Why it exists\n\nIn 1969 Ken Thompson created the B language at Bell Labs. B was BCPL \"squeezed into 8K bytes of memory and filtered through Thompson's brain\", and it had no types. The PDP-11 exposed its limits. Dennis Ritchie wrote that the machine's byte addressing \"exposed several inadequacies of B's semantic model\", and that \"a typing scheme was necessary to cope with characters and byte addressing\" ([Ritchie, The Development of the C Language](https://csapp.cs.cmu.edu/2e/docs/chistory.html)). C added the types int and char, with arrays and pointers to them, and in 1973 the Unix kernel was rewritten in it.\n\n## What it trades away\n\nC gives the programmer the machine with almost nothing in between. It has no runtime bounds checks and no rules about who owns a piece of memory, so buffer overflows and use-after-free bugs are the programmer's job to prevent. The compiler may accept code with undefined behaviour without an error, and the standard leaves many details to each implementation, so the same code can behave differently on different compilers. The ISO working group still revises the language and adopted C23 in 2024 ([WG14](https://www.open-std.org/jtc1/sc22/wg14/)).\n\n## Where it won\n\nThe Linux kernel is written in the C programming language, and its documentation says it is typically compiled with gcc in the GNU dialect of ISO C11 ([Linux kernel docs](https://docs.kernel.org/process/programming-language.html)). Unix followed the same path. Ritchie's account says that \"writing the Unix kernel in C had given us enough confidence\" in the language, and the kernel for the PDP-11 was rewritten in C in 1973 ([Ritchie](https://csapp.cs.cmu.edu/2e/docs/chistory.html)).",
  "url": "https://langwhy.dev/lang/c/",
  "markdown": "https://langwhy.dev/lang/c.md",
  "license": "CC0-1.0"
}