Department of Engineering

IT Services

ANSI C for Programmers on UNIX Systems

This document aims to:-

  • Introduce C by providing and explaining examples of common programming tasks.
  • Enable the reader to learn from available source code by clarifying common causes of incomprehension.

Coverage is not uniform: pedantry will be selective, aimed at describing aspects of C which are not present in other languages or are different to what a programmer from another language might expect. For a full description of C refer to one of the many books in the bibliography.

The first part of the document is an informal introduction to C. After the first set of exercises a more comprehensive description of some features is given. After the final set of exercises selected topics are covered. Note that the exercises and examples form an integral part of the course, containing information not duplicated elsewhere.

Carole Klein and Nick McLaren (Cambridge Computer Lab), Andy Piper, Campbell Middleton and James Matheson (CUED), contributors to comp.lang.c and various readers have all helped with this document.