What is C written in?
What C is used for
C is the language of operating systems, embedded devices, and the low-level machinery that everything else runs on. Its direct memory access and minimal runtime make it the default for kernels, device drivers, and language runtimes.
Notable software: the Linux and Windows kernels, SQLite, Redis, and the CPython, Ruby, and PHP interpreters are all written in C.
About C
C is a general-purpose programming language. It is a statically typed language that compiles ahead of time to native machine code. It supports imperative and procedural programming.
C first appeared in 1972 and was designed by Dennis M. Ritchie at Bell Labs. Today C is one of the most widely used programming languages in the world.
C in the language family tree
C drew on ideas from B, ALGOL, Fortran, BCPL, and ALGOL 68 and went on to influence C++, Objective-C, Ada, Python, D, and Zig.
Sources: Wikipedia · Wikidata · Official site
Quick Facts
- Short answer
- Compiled by GCC (C) and Clang (C++)
- Created by
- Dennis Ritchie at Bell Labs, 1972
- Standard
- ANSI C (1989), then ISO C
- Role
- Implementation language for most OS kernels and runtimes
Why C is the substrate of computing
C compiles directly to machine code, with no managed runtime of its own. That makes it the implementation language for operating-system kernels, language runtimes, and the compilers themselves. Many interpreters on this site, including CPython, the reference Ruby (MRI), and PHP, have runtimes written in C.
C is effectively self-hosting. A new build of GCC is produced by an existing C/C++ compiler in a multi-stage bootstrap, the same pattern used by self-hosting languages like Rust and Go.
C compilers compared
| Compiler | Written in | Notes |
|---|---|---|
| GCC | C and C++ | GNU Compiler Collection; bootstrapped in multiple stages |
| Clang | C++ | LLVM-based C/C++/Objective-C front end |
| TCC | C | Tiny C Compiler; small, fast, used in bootstrap discussions |
Frequently Asked Questions
Evidence Sources
- https://en.wikipedia.org/wiki/C_(programming_language)
- https://en.wikipedia.org/wiki/B_(programming_language)
- https://en.wikipedia.org/wiki/C%2B%2B
- https://en.wikipedia.org/wiki/Objective-C
- https://www.perl.org/get.html
- https://www.lua.org/about.html
- https://github.com/python/cpython
- https://github.com/php/php-src
- https://github.com/ruby/ruby
- https://www.r-project.org/
- https://go.dev/doc/faq#history
- https://github.com/iohub/rustboot
- https://github.com/ocaml/ocaml
- https://gitlab.haskell.org/ghc/ghc
- https://gcc.gnu.org/wiki/History
- https://github.com/erlang/otp
- https://spidermonkey.dev/
- https://webkit.org/
- https://github.com/dotnet/runtime
- https://github.com/swiftlang/swift
- https://nim-lang.org/docs/backends.html
- https://vlang.io/
- https://en.wikipedia.org/wiki/Ada_(programming_language)
- https://en.wikipedia.org/wiki/Glasgow_Haskell_Compiler
- https://en.wikipedia.org/wiki/Python_(programming_language)
- https://en.wikipedia.org/wiki/D_(programming_language)
- https://ziglang.org/
- https://en.wikipedia.org/wiki/Go_(programming_language)
- https://en.wikipedia.org/wiki/Julia_(programming_language)
- https://en.wikipedia.org/wiki/Erlang_(programming_language)
- https://en.wikipedia.org/wiki/Cython
- https://en.wikipedia.org/wiki/Perl
- https://en.wikipedia.org/wiki/PHP
- https://en.wikipedia.org/wiki/Bash_(Unix_shell)
- https://en.wikipedia.org/wiki/AWK
- https://en.wikipedia.org/wiki/Dyalog_APL
- https://en.wikipedia.org/wiki/Squeak
- https://en.wikipedia.org/wiki/Standard_ML
- https://en.wikipedia.org/wiki/MIT_Scheme
- https://en.wikipedia.org/wiki/S_(programming_language)
- https://en.wikipedia.org/wiki/Icon_(programming_language)
- https://en.wikipedia.org/wiki/Bourne_shell
- https://en.wikipedia.org/wiki/MATLAB
- https://en.wikipedia.org/wiki/Miranda_(programming_language)
- https://en.wikipedia.org/wiki/ABC_(programming_language)
- https://en.wikipedia.org/wiki/Newsqueak
- https://en.wikipedia.org/wiki/Modula-3
- https://en.wikipedia.org/wiki/Tcl
- https://en.wikipedia.org/wiki/J_(programming_language)
- https://en.wikipedia.org/wiki/Alef_(programming_language)
- https://en.wikipedia.org/wiki/Dylan_(programming_language)
- https://en.wikipedia.org/wiki/GNU_Guile
- https://en.wikipedia.org/wiki/Limbo_(programming_language)
- https://en.wikipedia.org/wiki/GNU_Fortran
- https://en.wikipedia.org/wiki/Cyclone_(programming_language)
- https://luajit.org/
- https://en.wikipedia.org/wiki/Pharo
- https://en.wikipedia.org/wiki/MoarVM
- https://en.wikipedia.org/wiki/Vala_(programming_language)
- https://en.wikipedia.org/wiki/Io_(programming_language)
- https://en.wikipedia.org/wiki/ATS_(programming_language)
- https://en.wikipedia.org/wiki/Chapel_(programming_language)
- https://en.wikipedia.org/wiki/Odin_(programming_language)
- https://en.wikipedia.org/wiki/Hare_(programming_language)
- https://en.wikipedia.org/wiki/Wren_(programming_language)
- https://en.wikipedia.org/wiki/QuickJS
- C on Wikidata (Q15777)