You are on page 1of 3

THE C PROGRAMMING LANGUAGE

The C programming language is the most popular computer language today. C is the language of choice for thousands of programmers working in various fields like systems programming, design and implementation of database management systems, firmware development, graphical user interfaces, mathematical modeling etc.

That C enjoys a vast following and popularity is not without reasons. There are several issues which make C the premier programming language in the world today. In this section we shall attempt to discover these reasons. In the process we would have had enough of light thrown on the subject for you to gain an insight into the language and its design objectives.

As you are aware, computer languages are classified into generations. Machine language, assembly language, and high level languages, are called, the first, second, and third generation languages respectively.

Let us leave the machine language out of discussion because no one programs in it today. y choosing the program in assembly language a programmer gains the opportunity to e!ploit the full power of the hardware. "ince the assembly programmer#s instruction set is directly based on the hardware#s native capabilities, what cannot be done in assembly language can just not be done at all with the given hardware. ut assembly programming has its own disadvantages$ %ontrol flow mechanisms &like if, while, for'( are not directly available, I)* functions are not available, the programs are not portable at all, besides the fact that an assembly language programmer ought to have an intimate knowledge of the hardware.

The first high level languages were designed precisely to address these problems. Languages like %* *L, +*,T,A- and .ascal provided high level control structures, I)* facilities, hardware independence and so on. ut /uite late in the evolution of compute languages it was reali0ed that while the high level languages provided high level mechanisms, they took the programmer farther and farther away from the hardware that, they simply were not suitable for system level programming &tasks like writing operating systems, compilers etc.(.

The reali0ation dawned that a good high level language is one, which while providing the desirable features of a 123L does not rob the programmer of the power of assembly language.
%opyright Logic *ption .vt. Ltd. .age 4 of 1

"o efforts were started to design a programming language, which would provide the best of both worlds$ the benefits of high level features on one hand and the speed, and power of assembly language on the other. The language was aptly named %.L %ombined .rogramming Language.

%.L was not destined to become popular, for one reason$ it was a very bulky and comple! language. A small derivative of %.L called %.L &for asic %.L( was developed by Martin ,ichards. %.L was further adapted by 5en Thompson to produce another language called , and we now are studying %, which was developed by 6ennis ,itchie based .

% is very suitable for system programming. C has often been called a high2level assembly language. This is because C deals with the same set of operands, as does the hardware$ numbers, characters, strings, and addresses. C implements a rich set of operators using which these operands can be manipulated. That C meets its design objectives can be reali0ed from the fact that several popular programs have been written in %$ the 7ni! operating system, the *,A%L8 database system, the %lipper compiler, d ase III .lus, the Turbo2% compiler, the M"29indows graphical kernel etc., to name just a few.

% encourages structured programming. The well2defined control flow mechanisms, and subroutine call mechanisms allow developing well defined, provable, easy to maintain code. The programmer can break down his program into functional units, develop them independently, and then integrate them into a complete application. The different modules can be present in different source files and they can be compiled separately$ facilitating participating by a team in the development.

% encourages code reusability. Apart from the standard C library &which contains a set of subroutines to perform I)*, string manipulation, file operations, heap management and so on(, the programmer can develop subroutines to perform various operations, load them into a library and possibly use them in a totally different application.

% is one of the most portable languages. The language very clearly spells out the issues that might affect portability and as long as your program does not tread on these grounds, your programs can be ported with ease to a new hardware, or a new *" or both.

%opyright Logic *ption .vt. Ltd.

.age : of 1

% is a general purpose programming language. Though the language had its origin in systems programming &it was originally developed to write 7ni! in(, it is /uite general purpose that it has been used in various other fields too.

%opyright Logic *ption .vt. Ltd.

.age 1 of 1

You might also like