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 simulated 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.
abram
{ ... } rather than either ALGOL 60's begin ... end or ALGOL 68's ( ... )
= is used for assignment (copying), like Fortran, rather than ALGOL's :=
== is used to test for equality (rather than .EQ. in Fortran, or = in BASIC and ALGOL)
Logical "and" and "or" are represented with && and ||; Note that the doubled-up operators don't
evaluate the right operand if the result can be determined from the left alone (short-circuit evaluation),
and are semantically distinct from the bit-wise operators & and |
[edit] Absent features
The relatively low-level nature of the language affords the programmer close control over what the
computer does, and allows special tailoring and aggressive optimization for a particular platform. This
allows the code to run efficiently on very limited hardware, such as embedded systems, and keeps the
language definition small enough to allow the programmer to understand most or all of the language,
but at the cost of some features not being included that are available in other languages:
kontrakan
No nested function definitions
No direct assignment of arrays or strings (copying can be done via standard functions; assignment of
objects having struct or union type is supported)
No automatic garbage collection
No requirement for bounds checking of arrays
No operations on whole arrays
No syntax for ranges, such as the A..B notation used in several languages
Prior to C99, no separate Boolean type (zero/nonzero is used instead)[6]
No formal closures or functions as parameters (only function and variable pointers)
No generators or coroutines; intra-thread control flow consists of nested function calls, except for the
use of the longjmp or setcontext library functions
No exception handling; standard library functions signify err