Introduction and History of C Programming Language
Introduction and History of C Programming Language
For many years, the de facto standard for was the version supplied with the
UNIX operating system. It was first described in The Programming Language by Brain
Kernighan and Dennis Richie (Englewood Cliffs, N.J.: Prentice-Hall, 1978). In the
summer 1983a committee was established to create an ANSI (American National
Standards Institute) standard that would define the language. The standardization
process took six year (much longer than anyone reasonably expected).
The ANSI C standard was finally adopted in December 1989, with the first copies
becoming available in early 1990. The standard was also adopted by ISO (International
Standard Organization), and the resulting standard was typically referred to as
ANSI/ISO Standard C. In 1995, Amendment 1 to the C standard was adopted which,
among other things, added several new library functions. The 1989 standard for C,
along with the Amendment 1, became a base document for standard C++, defining the C
subject of C++. The version C defined by the1989 standard is commonly referred to as
C89.
During the 1990s, the development of C++ standard consumed most programmers
attention. However, work on C continued quietly along, with a new standard for C being
developed. The end result was the 1999 standard for C, usually referred to as C99; In
general, C99 retained nearly all of the features of C89. Thus, C is still C!
The C99 standardization committee focused on two main areas: the addition of several
numeric libraries and the development of some special-use, but highly innovative, new
features, such as variable-length arrays and the restrict pointer qualifier. These
innovations have once again put C at the forefront of computer language development.
C is often called a middle level computer language. This does not mean that C is less
powerful, harder to use, or less developed than a high-level language such as BASIC or
Pascal, nor does it imply that Chas the cumbersome nature of assembly language (and
its associated troubles). Rather, C is thought of as a middle-level language because it
combines the best elements of high-level languages with the control and flexibility of
assembly language. Table1-1 shows how C fits into the spectrum of computer languages.
Macro-assembler
Low level Assembler
In the same vein, C does not demand strict type compatibility between a parameter
and an argument. As you may know from your other programming experience, a high-
level computer language will typically require that the type of an argument be (more or
less) exactly the same type as the parameter that will receive the argument. Such is not
the case for C. Instead, C allows an argument to be of any type so long as it can be
reasonably converted into the type of parameter. Further, C provides all of the
automatic conversions to accomplish this.
C is special in that it allows the direct manipulation of bits, bytes, words, and
pointers. This makes it well suited for system-level programming, where these
operations are common.
In your previous programming experience, you may have heard the term block-
structured applied to a computer language. Although the term block-structured
language does not strictly apply C, C is commonly referred to simply as a structured
language. It has many similarities to other structured languages, such as ALGOL, Pascal,
and Modula-2.
Note: The reason that C is not, technically, a block-structured language is that block-structured
languages permit procedures or functions to be declared inside other procedures or functions
to be declared inside other procedures or functions. However, since C does not allow the
creation of functions within functions, it cannot formally be called block-structured.
Surprisingly, not all computer programming languages are for programmers. Consider
the classic examples of nonprogrammer languages, COBOL and BASIC. COBOL was
designed not to be better the programmers lot, not to improve the reliability of the code
produced, and not even to improve the speed with which code can be written. Rather,
COBOL was designed, in part, to enable nonprogrammers to read and presumably
(however unlikely) to understand the program. BASIC was created essentially to allow
nonprogrammers to program a computer to solve relatively simple problems.
The fact that C can often be used in place of assembly language was major factor in its
initial success. Assembly language uses a symbolic representation of the actual binary
code that the computer executes directly. Each assembly-language operation maps into
a single task for the computer to perform. Although assembly language gives
programmers the potential to accomplish tasks with maximum flexibility and efficiency,
it is notoriously difficult to work with when developing and debugging a program.
Furthermore, since assembly language is unstructured, the final program tends to be
spaghetti codea tangled mess of jumps, calls, and indexes. This lack of structure
makes assembly-language programs difficult to read, enhance, and maintain. Perhaps
more important, assembly-language routines are not portable between machines with
different CPUs.
Initially, C was used for systems programming. A system program forms a portion of the
operating system of the computer or its support utilities, such as editors, compilers,
linkers, and the like. As C grew in popularity, many programmers began to use it to
program all tasks because of its portability and efficiencyand because they liked it! At
the time of its creations, C was a much longed- for, dramatic improvement in
programming languages. In the years that have since elapsed, C has proven that it is up
to any task.
With the advent of C++, some programmers thought that c as a district language would
cease to exit. Such is not the case. First, not all programs require the application of the