As a programming language for operating systems tasks, creating spectacular graphics and working with networks, the C language has matured well over the years, and has become indispensable.
The module has twin aims, namely, to teach programming constructs in C and to encourage the use of software tools that enhance the software development process. The module covers all stages of software development - from programming in C through creating software libraries to developing a graphical user interface.
The course is intended for scientists and engineers who wish to develop programs in C, and wish to acquire associated skills in the supporting software development tools. It assumes no previous knowledge of C, but a working knowledge of programming in a higher level language such as Fortran or Pascal or (Visual) Basic will be an advantage.
The course places greater emphasis on practicals. A significant amount of time is devoted to laboratory sessions to reinforce the fundamental concepts. Participants are strongly encouraged to develop small programs during these sessions. A selection of software development tools are used throughout the course
The course includes:
Overview:
Overview of C language (It is assumed that the students have some
knowledge of programming in a high level language).
Covering Variables and Arithmetic Expressions.
Control flow constructs:
if ... else, for, while, switch
Arrays:
Defining arrays and accessing elements
Types, Operators, and expressions:
Covering contraction operators, bitwise operators and
conditional expressions.
Basics of Functions:
Defining a function. Formal parameters of a function. Return
value. Functions with a
scalar and arrays as inputs.
Advanced use of Functions:
Scope rules. External Variables. Static Variables. Header files.
Basics of Pointers:
Pointers as special Variables. Accessing values stored in pointers.
Basics of Structures:
Structures and Functions. Returning a structure from a function.
Data Structures:
Defining self-referential structures (eg Linked lists and binary
trees). Examples
of single-server single-queue.
Advanced use of Pointers:
Multi-dimensional arrays. Pointer arrays. Command-line arguments. Pointers
to functions. Passing a function as a parameter. Sorting example.
Input and Output:
Standard input, output and error. Working with files. Formatted
output.
Simple Socket Programming:
Basics of sockets
Software Development Tools:
Basics of make. Creating a library. Using a library. Overview of prof and
version control.
Graphical User Interfaces:
Why GUIs? (and why Tcl/Tk?). Overview of Tcl/Tk. A shell for C
Elements of Tcl:
Introduction
to Tool Command Language. Covering Command Structure, flow control and
procedures.
Introduction to Tk
A tour of available widgets. Widget creation and
configuration. Binding events. Use of
entry widget. Example of mortgage calculator to illustrate the principles of
GUI.
The course lectures will be given by the teaching and research staff of the Applied Mathematics and Operational Research Group under the direction of Dr Venkat V S S Sastry with the assistance of other colleagues. Guest speakers may give lectures on advanced topics