The aim of this module is to provide an introduction to the fundamental concepts of computer programming.

Learning Outcomes

After completing this module, students will be expected to be able to:

1. Demonstrate an understanding of the basic principles and concepts that underlie the procedural programming model.
2. Explain and make use of high-level programming language features that support control, data and procedural abstraction.
3. Analyse and explain the behaviour of simple programs that incorporate standard control structures, parameterised functions, arrays, structures and I/O.
4. Implement, test and debug simple programs that use the features listed above.

Outline Syllabus

. Underlying principles of procedural programming
The imperative programming model; state, sequentiality and destructive assignment
Abstraction: separating internal and external views; control, data and procedural abstraction
A model of memory: variables; static and dynamic memory; the execution stack

. Programming in a high-level procedural language
Identifiers and keywords
Expressions and types: well-typed expressions; operator precedence and expression evaluation
Statements and control flow: simple, compound and control statements; the assignment statement; selection and repetition
Functions: definition, call and prototype declarations; local variables, scope and existence; parameters, formal and actual parameters, parameter passing
Arrays and structures: declaration and initialisation; accessing elements
Input and output: console and file I/O