C Definition | Business Dictionaries from AllBusiness.com
Facebook Twitter You Tube RSS Feed

Business Glossary

SEARCH THE BUSINESS GLOSSARY

Business Definition for: C
C

a programming language developed at Bell Laboratories in the 1970s, based on the two earlier languages B (1970) and BCPL (1967). A C compiler is provided as a part of the UNIX operating system (see UNIX), and C was used to write most of UNIX itself. In addition, C is popular as an alternative to assembly language for writing highly efficient microcomputer programs. There is a widespread (and often mistaken) belief that programs written in C are more efficient than programs written in any other language.

Cis a general-purpose language like Pascal andALGOL,but, unlike other general-purpose languages, it gives the programmer complete access to the machine's internal (bit-by-bit) representation of all types of data. This makes it convenient to perform tasks thatwould ordinarily require assembly language, and to perform computations in the most efficient way of which the machine is capable.

4001007101-01

In C, things that are easy for the CPU are easy for the programmer, and vice versa. For example, character string handling is somewhat clumsy because the CPU can only do it through explicit procedure calls. But integer arithmetic is very simple to program because it is simple for the CPU to execute. Most programmers who use C find themselves writing efficient programs simply because the language pushes them to do so.

Figure 46 shows a program written in C. This language encourages structured programming; the three loop constructs are while, do, and for. The comment delimiters are /* */. A semicolon comes at the end of every statement (unlike Pascal, where semicolons only come between statements).

C allows operations to be mixed with expressions in a unique way. The expression i++ means "retrieve the value of i and then add 1 to it." So if i equals 2, the statement j = (i++)*3 will make j equal 6 (i.e., 2×3) and will make i equal 3 (by adding 1 to it after its value is retrieved; but notice that its old value was used in the multiplication).

Another noteworthy feature of C is the #define statement. The sample program contains the line
#define N 256
which tells the compiler that wherever N occurs as a symbol in the program, it should be understood as the number 256.

See also C++ , printf , ANSI (American National Standards Institute)
Copyright © 2006, 2003, 2000, 1998, 1996, 1995, 1992, 1989, 1986 by Barron's Educational Series, Inc. Reprinted by arrangement with Publisher.

AllBusiness Greatest Hits