Efficiency
C is an efficient language. Its design takes advantage of the capabilities of current computers. C
programs tend to be compact and to run quickly. In fact, C exhibits some of the fine control
usually associated with an assembly language. (An assembly language is a mnemonic
representation of the set of internal instructions used by a particular central processing unit
design; different CPU families have different assembly languages.) If you choose, you can fine-
tune your programs for maximum speed or most efficient use of memory.
Portability
C is a portable language, which means that C programs written on one system can be run on
other systems with little or no modification. If modifications are necessary, they can often be
made by simply changing a few entries in a header file accompanying the main program. Most
languages are meant to be portable, but anyone who has converted an IBM PC BASIC program
to Apple BASIC (and they are close cousins) or has tried to run an IBM mainframe FORTRAN
program on a Unix system knows that porting is troublesome at best. C is a leader in
portability. C compilers (programs that convert your C code into the instructions a computer
uses internally) are available for about 40 systems, running from 8-bit microprocessors to Cray
supercomputers. Note, however, that the portions of a program written specifically to access
particular hardware devices, such as a display monitor, or special features of an operating
system, such as Windows XP or OS X, typically are not portable.
Because of C's close ties with Unix, Unix systems typically come with a C compiler as part of the
packages. Linux installations also usually include a C compiler. Several C compilers are
available for personal computers, including PCs running various versions of Windows, and
Macintoshes. So whether you are using a home computer, a professional workstation, or a
mainframe, the chances are good that you can get a C compiler for your particular system.
Power and Flexibility
C is powerful and flexible (two favorite words in computer literature). For example, most of the
powerful, flexible Unix operating system is written in C. Many compilers and interpreters for
other languages—such as FORTRAN, Perl, Python, Pascal, LISP, Logo, and BASIC—have been
written in C. As a result, when you use FORTRAN on a Unix machine, ultimately a C program
has done the work of producing the final executable program. C programs have been used for
solving physics and engineering problems and even for animating special effects for movies
such as Gladiator.
Programmer Oriented
C is oriented to fulfill the needs of programmers. It gives you access to hardware, and it enables
you to manipulate individual bits in memory. It has a rich selection of operators that allows you
to express yourself succinctly. C is less strict than, say, Pascal in limiting what you can do. This
flexibility is both an advantage and a danger. The advantage is that many tasks, such as
converting forms of data, are much simpler in C. The danger is that with C, you can make
mistakes that are impossible in some languages. C gives you more freedom, but it also puts
more responsibility on you.