What is C

What is C

C is a general-purpose programming language, and is used for writing programs in many different domains, such as operating systems, numerical computing, graphical applications, etc. It is a small language, with just 32 keywords. It provides “high-level” structuredprogramming constructs such as statement grouping, decision making, and looping, as well as “lowlevel” capabilities such as the ability to manipulate bytes and addresses.

C version history

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 original PDP-11 version of Unix was developed in assembly language. Thompson needed a programming language to make utilities. At first, he tried to make a Fortran compiler, but soon gave up the idea and made a new language, B, Thompson’s simplified version of BCPL.[10] However, few utilities were written in B because B was too slow, and B could not take advantage of PDP-11 features such as byte addressability. In 1972, Ritchie started to improve B, which resulted in creating a new language C. C compiler and some utilities made by C were included in Version 2 Unix.

At Version 4 Unix released at Nov. 1973, the Unix kernel was extensively re-implemented by C.[10] By this time, the C language had acquired some powerful features such as struct types. Unix was one of the first operating system kernels implemented in a language other than assembly. Earlier instances include the Multics system (which was written in PL/I) and Master Control Program (MCP) for the Burroughs B5000 (which was written in ALGOL) in 1961. In around 1977, Ritchie and Stephen C. Johnson made further changes to the language to facilitate portability of the Unix operating system. Johnson’s Portable C Compiler served as the basis for several implementations of C on new platforms.

Code Example

   int main ()
         printf("Hello World");
         return 0;