1. | Welcome | ToC | FAQ | Resources | Courses | Projects | Mail Lists | Members | Misc |
2. | Fundamentals | Languages | Tools | Net | Core | Advanced |
3. | EoC | Java |
4. | Lessons |
5. | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 |


Essence of C
1 - Overview

Origins and Nature of C, Libraries, Linking, Compilation, Memory Map, Language Fundamentals, Keywords

Origins of C

C was developed at the Bell Laboratories in the early 70s by UNIX pioneer Dennis Ritchie and was first implemented on a DEC PDP-11 using the UNIX operating system.

C, like all the structured languages (Pascal, PL/I, etc) can trace its ancestry back to ALGOL.

For many years, the de-facto standard for C was the version supplied with UNIX Version 5, as described by Kernighan and Ritchie. To achieve standardisation, ANSI established a committee in 1983 to define the C language once and for all. Given this lineage, most current literature on the language covers both the old UNIX version of C and the ANSI standard.

The Nature of C

C is considered to be a middle level language because it combines elements of high-level languages with the functionalism of assembly language. Because it allows the direct manipulation of bits, bytes, words and pointers, it is well suited to system-level programming.

C is a structured language in that it has the ability to section off and "hide" from the rest of the program all information and instructions required to perform a specific task.

C is a primitive language in that it has none of the built-in features for input and output, string manipulation and higher mathematics found in other languages. C's features come in function libraries.

C is a compiled language. C compilers read the source code and convert it to object code, sometimes referred to as binary or machine code.


Libraries and Linking

C compilers come with a standard C library of functions. These functions perform commonly needed tasks. ANSI specifies a minimal set of functions; however, most compilers provide many others.

When a function which is not part of the C program is called, the compiler "remembers" its name. Later, the linker combines your code with the object code in the standard library.

Some functions defined in the original UNIX version of C are not defined in ANSI because they are redundant.

Functions written by the programmer may also be placed in a library.

Separate Compilation

C allows a program to be contained in separate files, which are compiled separately before being linked. The advantage of separate compilation is that, if the programmer changes the code in one file, he does not need to recompile the whole program. This saves time.

C's Memory Map

A compiled C program creates and uses four logically distinct regions of memory, viz:

C Language Fundamentals

Any section of a C program is likely to contain the following elements:

ANSI C Keywords

The following is the complete list of C keywords, itemized by usage, and as defined by the ANSI standard. Of these enum, const, signed, void, and volatile were added by the ANSI committee.

Category Keyword
Data Types char double float int void
Data Type Modifiers long short signed unsigned
Access Type Modifiers const volatile
Storage Class Specifiers auto extern register static
User-Defined Data Types enum struct typedef union
Selection (Conditional) case default else if switch
Iteration do for while
Jump break goto return continue
Compile Time Operator sizeof

Index · Next Chapter


Copyright © 1996, 1997, 1998. Last Update to This Page: 1998/10/24
This Page Maintained by: radar pangaean * * * Original Author: K.J.Bricknell
The MOST web site is built and maintained by the voluntary efforts/donations of our members.