The University of Reading's Systems Engineering module SE1SA5 has introduced the majority of programming concepts in the C programming language. This example program is used to summarise the later units of this module so far.

Topics

  • Repetition
  • Conditions
  • Arrays
  • Functions
  • Compilation Units (multiple files)
  • Structures

Analysis

A Program should be created in order to demonstrate the uses of each topic. It should be clearly commented for future reference.

Design

Individual functions should be created in order to demonstrate the uses of each topic. At least one of these functions should be external to the file with the main(); function. With a prototype for this function defined in a header file. This will allow for demonstration of compilation units.
Implementation
The program consists of 3 files; main.c util.c util.h
Each of these files are required for the program to compile.
Code
Syntax highlighting thanks to pastie.org