Copyright © 2010 K-Tutorials.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

The contents are updated or revised periodically; the document version will be changed based on the update or revision of the contents.

Document version: 1.0

Friday, September 24, 2010

History of 'C' Language


Before we start any complex program in C, we must understand what really C is, how it came into existence and how it differs from other languages of that time. ‘C’ seems a strange name for a programming language. In this tutorial I will try to talk about these issues and then move towards view structure of a typical C program.

The root of all modern languages is ALGOL, introduced in the early 1960’s. ALGOL was the first computer programming language gave the concept of structured programming in the computer science community. It never became popular in all over the world, but it was widely used in Europe.
In 1967, Martin Richards developed a language called BCPL (Basic Combined Programming Language) primarily used for writing system software.

The development of UNIX in the C language made it uniquely portable and improvable.

The first version of UNIX was written in the low-level PDP-7 assembler language. Soon after, a language called TMG was created for the PDP-7 by R. M. McClure. Using TMG to develop a FORTRAN compiler, in 1970 Ken Thompson instead ended up developing a compiler for a new high-level language he called B, based on the earlier BCPL language developed by Martin Richard. Where it might take several pages of detailed PDP-7 assembly code to accomplish a given task, the same functionality could typically be expressed in a higher level language like B in just a few lines. B was thereafter used for further development of the UNIX system, which made the work much faster and more convenient.

When the PDP-11 computer arrived at Bell Labs, Dennis Ritchie built on B to create a new language called C which inherited Thompson's taste for concise syntax, and had a powerful mix of high-level functionality and the detailed features required to program an operating system.

C is a programming language which born at “AT & T’s Bell Laboratories” of USA in 1972. It was written by Dennis Ritchie. This language was created for a specific purpose: to design the UNIX operating system (which is used on many computers; one of the most network operating systems used in today and heart of the Internet super highway with rich security features). From the beginning, C was intended to be useful--to allow busy programmers to get things done.

Most of the components of UNIX were eventually rewritten in C, culminating with the kernel itself in 1973. Because of its convenience and power, C went on to become the most popular programming language in the world over the next quarter century.

This development of UNIX in C had two important consequences:
  • Portability. It made it much easier to port UNIX to newly developed computers, because it eliminated the need to translate the entire operating system to the new assemble language by hand:
    • First, write a C-to-assembly language compiler for the new machine.
    • Then use the new compiler to automatically translate the UNIX C language source code into the new machine's assembly language.
    • Finally, write only a small amount of new code where absolutely required by hardware differences with the new machine.
  • Improvability. It made UNIX easy to customize and improve by any programmer that could learn the high-level C programming language. Many did learn C, and went on to experiment with modifications to the operating system, producing many useful new extensions and enhancements.

Because C is such a powerful, dominant and supple language, its use quickly spread beyond Bell Labs. In the late 70’s C began to replace widespread well-known languages of that time like PL/I, ALGOL etc.

During 1970’s, C had evolved into what is now known as “traditional C”. The language became more popular after publication of the book “The C Programming Language” by Brian Kerningham and Dennis Ritchie in 1978 and the book was so popular the language came to be known as “K&R C” among the programming community.

Programmers everywhere began using it to write all sorts of programs. Soon, however, different organizations began applying their own versions of C with a subtle difference. This posed a serious problem for system developers. To solve this problem, the American National Standards Institute (ANSI) formed a committee in 1983 to establish a standard definition of C. This committee approved a version of C in 1989 which is known as ANSI C. With few exceptions, every modern C compiler has the ability to adhere to this standard. ANSI C was then approved by the International Standards Organization (ISO) in 1990 (ANSI/ISO C).

The C language is so named because its predecessor was called B. The B language was developed by Ken Thompson of Bell Labs.