C is a general-purpose programming language, which features economy of expression, modern control flow and data structures and a rich set of operations. It has been called as “system programming language” because it is useful for writing compilers and operating systems.
Brief History of C
ALGOL (Algorithmic Language) - 1960
CPL (Combined Programming Language) - 1963
BCPL (Basic Combined Programming Language) - 1967
developed by Martin Richards
this language in turn strongly influenced the development of the next language B.
B - 1970
written and developed by Ken Thompson for the first UNIX system on the DEC PDP-7. Both BCPL and B are “type less” languages. C - 1972
an expansion of B.
a programming language designed by Dennis Ritchie in 1972 at AT and T Bell Laboratories. C was originally designed for and implemented on the UNIX operating system on the DEC PDP – II. the new C added something that B do not have: data types
Turbo C – 1987
a particular version of C developed by Borland International Corporation. This version is designed to run on various microcomputer systems, namely those which use the operating system MS-DOS, the operating system for the IBM Personal Computers and Compatibles.
Definition of terms
Interpreters → reads the source code of your program one line at a time and performs the specific instructions contained in that line. Compilers → reads the entire program and converts it into object code, which is a translation of the program source code into a form that can be directly executed by the computer. Compile Time → refers to the events that occur during the compilation process.
1 Object Code → is also referred to as binary or machine code
→ a translation of the source code of a program into machine code, which the computer can read and execute directly. → Object code is the input to the linker
2 Source Code → the text of a program that a user can read, commonly thought of as program.
→ The source code is the input into the C compiler.
Run Time → refers to the events that occur while the program is actually executing. Library → collection of pre-written.
Syntax → errors that are detected during compiled time.
Semantic/ Run-time → errors that are detected during execution time.
The Programming Process
( implemented using C Language)
Components of turbo C
Turbo C is more than just a version of the C language. Rather, it includes a complete environment in which to create, test, and run program. This programming environment consists of a number of components:
1. Editor → used to create program source code.
2. Extended C Language → this version o C is significantly extended from the “base bones” language of Ritchie’s specifications. The extension includes enhancement which make the Turbo C compatible with the new proposed and ANSI Standard. 3. Compiler → used to convert source code into machine code or binary code. 4. Debugger → used for testing program and locating programming errors. 5. Run-Time Environment→ the capability for running programs within the Turbo C system. 6. User Interface → the various of Turbo C are integrated into a single program which allows you to smoothly from source code entry to compilation to debugging to running without ever leaving the Turbo C environment.
Features and Characteristics of C
Middle Level Language
combines elements of high-level language with the functionalism of assembly language
it is possible to adapt software written for one type of computer for use on another Ex. Program written for an Apple II+ can be easily moved to an IBM PC.
C allows almost all meaningful type conversions.
Ex. Char and integer types may be freely intermixed in most expressions.
Turbo C has 43 keywords ( 32 as defined by the ANSI standard and 11 added by BORLAND...