C is an imperative (procedural) systems implementation language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support. C was therefore useful for many applications that had formerly been coded in assembly language.
Despite its low-level capabilities, the language was designed to encourage machine-independent programming. A standards-compliant and portably written C program can be compiled for a very wide variety of computer platforms and operating systems with little or no change to its source code. The language has become available on a very wide range of platforms, from embedded microcontrollers to supercomputers.
Like most imperative languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope and recursion, while a static type system prevents many unintended operations. In C, all executable code is contained within functions. Function parameters are always passed by value. Pass-by-reference is achieved in C by explicitly passing pointer values. Heterogeneous aggregate data types (struct) allow related data elements to be combined and manipulated as a unit. C program source text is free-format, using the semicolon as a statement terminator (not a delimiter).
C also exhibits the following more specific characteristics:
* non-nestable function definitions
* variables may be hidden in nested blocks
* partially weak typing; for instance, characters can be used as integers
* low-level access to computer memory by converting machine addresses to typed pointers
* function and data pointers supporting ad hoc run-time polymorphism
* array indexing as a secondary notion, defined in terms of pointer arithmetic
* a preprocessor for macro definition, source code file inclusion, and conditional compilation
* complex functionality such as I/O, string manipulation, and mathematical functions consistently delegated to library routines
* A relatively small set of reserved keywords
* A lexical structure that resembles B more than ALGOL, for example
o { ... } rather than ALGOL's begin ... end
o the equal-sign is for assignment (copying), much like Fortran
o two consecutive equal-signs are to test for equality (compare to .EQ. in Fortran or the equal-sign in BASIC)
o && and || in place of ALGOL's and and or (these are semantically distinct from the bit-wise operators & and | because they will never evaluate the right operand if the result can be determined from the left alone (short-circuit evaluation)).
o a large number of compound operators, such as +=, ++, etc.