Thursday, November 15, 2007

History of Turbo C

C stands for COMBINED PROGRAMMING LANGUAGE. Sometimes called SYSTEM PROGRAMMING LANGUAGE or SPL. C parallels with UNIX in 1969, by Bell Laboratories that sought an alternative to the Multics operating system for PDP-7 computer. The original version of Multics operating system was written in assembly language.

The reason why the language is called C is that it is the successor to the language called B which was developed by Ken Thompson in 1970 while working on DEC PDP-7. B was the successor the language called BCPL (Basic Combined Programming Language) which was developed by Martin Richards.

The C Language was designed in 1972 by Dennis Ritchie and first implemented at Bell Laboratory using DEC PDP-11 computer.

In 1978 Brian Kernighan and Dennis Ritchie wrote the famous book called THE C PROGRAMMING LANGUAGE.

C is often called a Middle Level Language but has a functionalism of a high-level language and assembly language. C has only 32 keywords (27 from Kernighan and Ritchie standard and 5 added by the ANSI Standardization committee).

Programming is a series of individual instructions to the computer that collectively perform a meaningful task. It is the act of writing or coding computer instructions. Program Source Code is the finished encoded instructions.

Programmer is the one who write the computer program and the first lady programmer is Lady Augusta "Ada" Byron.

Translator is use to transform the source code into a machine language that the computer can understand. Linker is use to adjust the translated source file so that the program will run.

Linking is usually distinct from the compiling process on a machine running MS-DOS.

____

ALGORITHM An Algorithm is a series of instructions that performs a specific task; It is a procedure that can be used to solve a particular problem.

An Algorithm is a list of instructions for carrying out some problems step by step.

Sequence - All programs are based on sequential execution of sequence instructions.

Decision - The primary way in which you can alter the sequential execution of the statements is to insert a decision step. Branching is a decision steps that lets the execution flow in two or more directions.

Iteration - is often called looping. It causes an iteration instruction or a set of instructions to be executed repeatedly.

Features of C-Language

1. Compact - C has only 32 standard keywords. Manufacturers of C-Compact language compilers are free to use additional keyword.

2. Structured - C permits certain portions of a program to have structured private access to data items stored in the computer memory, as well as the access to data items that are accessible by the rest of the program.

3. Portable - tasks that requires interaction with peripheral device; Portable such as disk drives or the video display, can be handled by standard library routines, which are not part of the c-language itself.

4. Flexible - C has proved to be suitable for variety of programming tasks. C allows relatively
unrestricted conversion of data from one type to another, such as the conversion of character to its numeric equivalent.

DIFFERENCES BETWEEN PASCAL AND C LANGUAGE

1. In Pascal, you can use lower case and uppercase but in C, you are only allowed to use lower case only for input and output.1. In

2. In Pascal comments are enclosed by { } or (* *); In C comment are enclosed in /* */

3. In Pascal, we use BEGIN and END in C {left curly braces signifies the beginning of the program while right curly braces signifies the end of the program.

4. In Pascal, (;) semicolon is used as statement separator. While in C, it is a statement terminator.

5. In Pascal, we use write or writeln to print the output list. In C, printf as write and printf("backslash n") for writeln.

6. In Pascal, we use read or readln to read from the keyboard. In C scanf, gets, getch, getche, getchar in different kind usage.

7. In Pascal it uses unit file, in C built in header file.

8. In Pascal libraries, in C its header file and libraries.

BASIC ELEMENTS OF C PROGRAMMING LANGUAGE

1. Directives - Instructs the C preprocessor to act on text of directives the program.

2. Declarations - Establish names and define characteristics such as size, scope, and data types.

3. Definitions - are declarations that allocate storage.

3.1 Function definition - declares the function name, its parameters, and the data type of the value it returns.
3.2 Statement order - affects how you can use variables and statement order functions.

BASIC COMPONENTS OF A PROGRAM

1. Programs must obtain information from some input source
2. Programs must decide now this input is to arranged and stored
3. Programs must use a set of instructions to manipulate the input
3.1 Single statement
3.2 Conditional Statements
3.3 Loops
3.4 Subroutines
4. Programs must report the results of the data manipulation
5. Well written application incorporates all of the fundamentals just listed, expressed in good modular design, self-documenting codes and good indention scheme.

No comments: