Your web browser may be malfunctioning. How to comment c code internet connection may be unreliable.
For more information about the W3C website, see the Webmaster FAQ. For the book, see The C Programming Language. Text in light blue serif capital letters on white background and very large light blue sans-serif letter C. C was originally developed by Dennis Ritchie between 1969 and 1973 at Bell Labs, and used to re-implement the Unix operating system.
C is an imperative procedural language. Like most imperative languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope and recursion, while a static type system prevents many unintended operations. More than one assignment may be performed in a single statement. Function return values can be ignored when not needed.
Typing is static, but weakly enforced: all data has a type, but implicit conversions may be performed. Array indexing is a secondary notation, defined in terms of pointer arithmetic. Enumerated types are possible with the enum keyword. They are freely interconvertible with integers. Strings are not a separate data type, but are conventionally implemented as null-terminated arrays of characters. Low-level access to computer memory is possible by converting machine addresses to typed pointers.
Functions may not be defined within the lexical scope of other functions. Function and data pointers permit ad hoc run-time polymorphism. A preprocessor performs macro definition, source code file inclusion, and conditional compilation. There is a basic form of modularity: files can be compiled separately and linked together, with control over which functions and data objects are visible to other files via static and extern attributes.
O, string manipulation, and mathematical functions are consistently delegated to library routines. The origin of C is closely tied to the development of the Unix operating system, originally implemented in assembly language on a PDP-7 by Dennis Ritchie and Ken Thompson, incorporating several ideas from colleagues. Eventually, they decided to port the operating system to a PDP-11. The development of C started in 1972 on the PDP-11 Unix system and first appeared in Version 2 Unix.