Preface

What C gets right.

  • C is a general-purpose programming language.
  • It is not a very high level language, nor a big one.
  • It was originally designed for and implemented on the UNIX operating system.
  • Very useful for writing operating system, compilers and system programs and hence it is also called a “systems programming language”.
  • Many important ideas in C stem from BCPL and B. [BCPL -> B -> C]
  • BCPL and B are “typeless” languages, they don’t have data types defined.
  • On the other hand, C provides a variety of data types, as well as a hierarchy of derived data types like structure and union.
  • Expressions are statements in C.
  • Pointers provide machine-independent address arithmetic.
  • Control flow constructions - for, while, if-else, etc.
  • Functions in C might be in separate source files that can be compiled separately.
  • Concept of Local(Automatic) and Global variables.
  • Preprocessing to include libraries and to perform macro expansion.

Some Features of C

  • C provides no input/output facilities(READ or WRITE).
  • C provides no operation to deal directly with composite objects such as strings and arrays.
  • No storage allocation other than static definition and stack discipline provided by local variables of functions.
  • There is no heap and garbage collection.
  • C offers only straightforward, single-thread control flow: tests, loops, etc., but no parallel operation, multiprogramming, sync, or coroutines.
  • C Programming language was standardized by ANSI (American National Standards Institute) in 1988.
  • ANSI C also included definition of a library to accompany C. It specifies functions for accessing the operating system (Read/Write), formatted input and output, memory allocation, string manipulation, etc. This library is closely modeled on the “standard I/O library” of the UNIX system.