History of C Language

By 1960 a horde of computer language had come into existence almost each for a specific purpose. For example, COBOL was being used for a specific purpose. For example, COBOL was being used for Commercial Applications, FORTRAN for Engineering and Scientific Applications and so on. At this stage people started thinking that instead of learning and using so many languages, each for a different purpose, why not use only one language which can program all possible applications. Therefore, an international committee was set up to develop such a language. This committee came out with a language called ALGOL 60.

However, ALGOL 60 never really became popular because it seemed to abstract, too general. To reduce this abstractness and generality, a new language called Combined programming Language (CPL) was developed at Cambridge University. CPL was an attempt to bring ALGOL 60 down to earth. However, CPL turned out to be so big, having so many features, that it was hard to learn and difficult to implement.

Basic Combined Programming Language (BCPL)

developed by Martin Richards at Cambridge University aimed to solve this problem by bringing CPL down to its basic good feature. But unfortunately it turned out to be too less powerful and too specific. Around same time a language called B was written by Ken Thompson at AT & T’s Bell Labs, as a further simplication of CPL. But like BPCL, B too turned out to be very specific. Ritchie inherited the feature of B and BCPL, added some of his own and developed C. Ritchie’s main achievement is the restoration of the lost generality in BCPL and B and still keeping it powerful.

C’s compactness and coherence is mainly due to the fact that it’s a one man language. Other examples of one man languages are LISP, PASCAL and APL. Counter examples include many headed monsters like PL/I, ALGOL 60 and ADA.

The following figure shows the various stages in evolution of C Languages

YearLanguageDeveloped byRemarks
1960ALGOLInternational CommitteeToo general, too abstract,        
1963CPLCambridge UniversityHard to learn, difficult to implement
1967BCPLMartin Richards at Cambridge UniversityToo specific, could deal problems
1970BKen Thompson at AT & T’s Bell Labs.Too specific, could deal with only specific problems
1972CDennis Ritchie at AT & T’s Bell Labs.Lost generality of BCPL and B restored.
Various Stages in evolution of C languages

Let us now see how does C compare with other programming languages. All the programming languages can be divided into categories:

(a) Problem oriented languages or High level Languages:
These languages have been designed to give a better programing efficiency, i.e. faster program development. Examples of languages falling in this category are FORTRAN, BASIC, PASCAI etc.

(b) Machine oriented languages or Low level languages:
These languages have been designed to give a better machine efficiency, i.e. faster program execution. Examples of languages falling in this category are Assembly language and Machine Language.

C stands in between these two categories. That’s why it is often called a Middle level language, since it was designed to have both: a relatively good programming efficiency (as compared to Machine oriented languages) and a relatively good machine efficiency (as compared to Problem oriented languages).

Structure Of A C Program

Any C program consists of one or more distinct units called ‘functions’. These functions consists of valid C statements and are linked together through ‘function calls’. A ‘function’ is analogues to a subroutine or a procedure in other high level languages. Every ‘function’ in a program has a unique name and is designed to perform a specific task. The task to be accomplished by the function is defined by a group or block of instructions or statements. Every function with its defined by a group or block of instructions or statements. Each function with its block of statements is treated as one single unit in C language and can be placed anywhere in the program.

Each instruction in a function is written as a separate statement. These statements must appear in the same order in which we wish them to be executed; unless of course the logic of the problem demands a delibrate ‘jump’ or transfer of control to a statement which is out of sequence.

However big a C program, the following rules are applicable to all statements present in it:

(a) Blank spaces may be inserted between two words to improve the readability of the statement. However, no blank spaces are allowed within a word.

(b) Usually all C statements are entered in small case letters.

(c) C has no specific rules about the position at which different parts of a statement are to be written. Not only can a C statement be written anywhere in a line, it can also be split over multiple lines. This is why it is many a times called a free form languages.

(d) Any C statement always ends with a semicolon (;).

following figure shows the skeleton of a typical C program which satisfies the adore-mentioned rules. Alongside a simple C program to calculate simple interest is also shown. At this stage you may not be able to understand this program. Don’t worry, it has been given here just as a simple program.

Main()
{    
Statement 1 ;    
Statement 2 ;
}
Function1 ()
{    
Variable declarations ;    
Statement 1 ;    
Statement 2 ;
}
STRUCTURE OF C PROGRAM  
/*Calculation of simple interest*/
/*Author gekay   Date 12/01/20*/
main()
{    
float p, n, r, si ;    
P = 1000 ;    
N = 3 ;    
R = 8.5 ;    
Si = p*n*r / 100 ;    
Printf ( “%f” , si) ;
}
SAMPLE OF C PROGRAM  

Some conclusion can now be drawn from the program given in the following figure.

(a) A C program is nothing but a collection of one or more functions.

(b) Every program must have a special function named main (). The program execution starts from his function.

(c) Group of statements within main () are executed sequentially. The closing brace of the main() function signals the end of the program.

(d) There should be a main () function somewhere in the program so that the computer can determine where to start the execution.

(e) The main () function can be located anywhere in the program, but the general practice is to place it as the first function for better readability.

FOR MORE INFORMATION

Contact Us

Visit

TeamSOFTLINE777

Related Posts