This is an old version, saved 3 Dec 2026, 07:53 by TechWritereditor. It is the current version.
C (programming language)
C is a general-purpose programming language created by Dennis Ritchie at Bell Labs in the early 1970s. It was designed as a small, minimalist language for writing operating systems, and it went on to become one of the most widely used languages for system software and applications.[1][4]
History
C grew out of the effort to build the Unix operating system. In 1969 and 1970 Ken Thompson created a language called B, derived from Martin Richards's earlier language BCPL, so that Unix would have a language for system programming. B had no data types and was squeezed into the very small memory of a PDP-7 minicomputer.[2][3]
When Unix moved to the larger PDP-11, B proved slow and poorly suited to the new machine. In 1971 Ritchie added a character type and wrote a compiler that produced PDP-11 machine code, calling the result "new B". He then added a fuller type system and renamed the language C. Ritchie later described 1972 as the most creative year of its development.[2][3]
In 1973 Thompson and Ritchie rewrote most of the Unix kernel in C. Because the system was no longer tied to one machine's assembly language, it became much easier to develop further and to move to other computers.[2][5] Between 1977 and 1979 the language was refined to improve portability and type safety as Unix was carried to new hardware.[1][2]
Design and features
C sits close to the hardware while still being easier to read than assembly language. Its main features include:
- Data types: characters, integers of several sizes, unsigned types, structures, unions and enumerations.[2]
- Pointers: variables that hold memory addresses. A key idea is that an array's name is treated as a pointer to its first element when used in an expression.[2]
- Declarations that mirror use: the way a variable is declared resembles the way it is later used in expressions.[2]
- A preprocessor: added around 1972–73, it handles lines such as
#includeand#definebefore compilation.[2] - Manual memory handling: the programmer, not the language, is responsible for using memory correctly, which gives fine control but also room for mistakes.[10]
Ritchie himself called C "quirky, flawed, and an enormous success". He listed weaknesses such as its tolerance of type errors, its error-prone null-terminated strings and its limited support for organising very large programs.[2]
Standardisation
For more than a decade the informal reference for C was The C Programming Language, a 1978 book by Brian Kernighan and Ritchie, often called "K&R".[1][2]
As C spread in the 1980s, including onto personal computers, a formal standard became necessary. The American National Standards Institute (ANSI) set up its X3J11 committee in 1983, and its standard was completed at the end of 1989. The main change was function prototypes, which declare the types of a function's arguments; the keywords const and volatile were also added.[1][2]
The International Organization for Standardization (ISO) adopted the standard as ISO/IEC 9899:1990, and later revisions followed:[2][6]
- C99 – ISO/IEC 9899:1999, published in December 1999.[6]
- C11 – ISO/IEC 9899:2011, published in December 2011.[6]
- C17 – ISO/IEC 9899:2018, the fourth edition, published in June 2018.[8]
- C23 – ISO/IEC 9899:2024, the fifth edition, published in October 2024 by the ISO/IEC JTC 1/SC 22 committee.[7]
Uses
C remains popular in Unix-like operating systems and is widely used for system software.[1] The kernel of Linux is written in C, normally compiled with the GCC compiler using a GNU variant of the C11 standard; since recent versions the kernel has also accepted code written in Rust.[9] The Computer History Museum noted in 2025 that C is still among the most widely used programming languages in the world.[4]
Influence
Many later languages descend from or borrow heavily from C, including C++, Objective-C and C#. Java, introduced in the mid-1990s, was described as a simplified relative of C intended for the Internet and for small devices.[1]
Ritchie and Thompson received the 1983 ACM Turing Award, and in 1998 they were jointly awarded the US National Medal of Technology. Their rewrite of Unix in C is a central part of their legacy.[3][5]
Criticism
Because C gives programmers direct access to memory, errors such as buffer overflows (writing past the end of a block of memory) and use-after-free bugs (using memory that has already been released) are easy to make and can be exploited by attackers.[10]
In December 2023 the US Cybersecurity and Infrastructure Security Agency (CISA), the NSA, the FBI and agencies from Australia, Canada, New Zealand and the UK published guidance urging software makers to plan a move to memory-safe languages. The guide names C and C++ as examples of memory-unsafe languages, and the agencies said that about two-thirds of software vulnerabilities come from a lack of memory safety.[10][11]
See also
References
- ^ C computer programming language. Encyclopaedia Britannica. britannica.com
- ^ The Development of the C Language. Nokia Bell Labs. nokia.com
- ^ Dennis M. Ritchie. Encyclopaedia Britannica. britannica.com
- ^ A Computing Legend Speaks. Computer History Museum. 2025-10-08. computerhistory.org
- ^ Dennis M. Ritchie – A.M. Turing Award Laureate. Association for Computing Machinery. amturing.acm.org
- ^ WG14 – C standards. ISO/IEC JTC1/SC22/WG14. open-std.org
- ^ ISO/IEC 9899:2024 – Information technology – Programming languages – C. International Organization for Standardization. iso.org
- ^ ISO/IEC 9899:2018 – Information technology – Programming languages – C. International Organization for Standardization. iso.org
- ^ Programming Language – The Linux Kernel documentation. The Linux Kernel Organization. docs.kernel.org
- ^ The Case for Memory Safe Roadmaps. CISA, NSA, FBI and partner agencies. 2023-12-06. media.defense.gov
- ^ CISA, NSA, FBI and international cybersecurity authorities publish guide: The Case for Memory Safe Roadmaps. Cybersecurity and Infrastructure Security Agency. cisa.gov