Imperative Programming in C
Run by School of Computer Science and Electronic Engineering
10 Credits or 5 ECTS Credits
Organiser: Dr Llyr Ap Cenydd
Overall aims and purpose
To present the C programming language and to present underpinning theories and practical experience of imperative programming and especially on memory management and memory structures.
• The concept of structured programming including Dijkstra and others (Sequences, no jumps, no goto, constructs having predictable logic).
• History: Fortran, Algol 60, COBOL, Pascal, C, C++.
• Types, Program state, memory, Turing completeness, Arithmetic operations, assignment, sequencing, looping and branching.
• Understand the purpose and use of pointers and how they can be manipulated.
• Concepts of stack and heap. Strategic use of memory using malloc, free, new, delete and delete.
• Understand multi-dimensional arrays, and how they are stored. Demonstrate ability to find index of an element such as an array.
• Understand passing of parameters by value, reference and pointer.
• Understand the structure of declarations and definitions in C++ (ie .cpp and .h files). Demonstrate class, struct and iostream.
• Use linked lists to represent graphs and solve problems that need to be represented on a graph.
• Implement sorting and search algorithms.
Learning outcomes mapped to assessment criteria
Imperative programming principles and history.
|A basic understanding of the principles of imperative programming, and its history.||A good understanding of the principles of imperative programming and a comprehensive understanding of the history and the main commands.||An excellent understanding of imperative programming and concepts such as Turing completeness and state etc.|
Pointers and pointer arithmetic
|A basic understanding of pointerss and what they are used for.||A good understanding of pointers and pointer arithmetic and how to use it.||An excellent grasp of pointers and comprehensive understanding of their manipulation.|
|A basic understanding of stack, heap and memory management such as malloc.||A good knowledge and understanding of memory manipulation and management.||A comprehensive knowledge of the concepts, and an excellent ability to demonstrate their use.|
|A basic knowledge of arrays and indexing.||A good ability of indexing.||Excellent ability to manipulate multi-dim arrays.|
Parameter Passing and returning values
|Basic idea of parameter passing.||Good idea of parameters and by value and by ref.||Excellent manipulation and control over parameters.|
Principles of C++
|Basic understanding of declarations and defs in C++.||A good knowledge of include files etc and structures in C++.||An excellent understanding and manipulation of include, and structures such as class, struct, isostream.|
|Basic idea of key algorithms and what they do.||Good understanding of linked algorithms and knowledge of suitable manipulation methods.||Excellent understanding and manipulation of linked lists (etc) and to construct them in C/C++.|
Teaching and Learning Strategy
Laboratory preparation and reports
24 hours over 12 weeks
12 hours over 12 weeks.
8 Core lectures. 4 Tutorials.
ASSESSED assignments, including tutorial questions, problems, essays etc.
- Computer Literacy - Proficiency in using a varied range of computer software
- Self-Management - Able to work unsupervised in an efficient, punctual and structured manner. To examine the outcomes of tasks and events, and judge levels of quality and importance
- Information retrieval - Able to access different and multiple sources of information
- Critical analysis & Problem Solving - Able to deconstruct and analyse problems or complex situations. To find solutions to problems through analyses and exploration of all possibilities using appropriate methods, rescources and creativity.
- Self-awareness & Reflectivity - Having an awareness of your own strengths, weaknesses, aims and objectives. Able to regularly review, evaluate and reflect upon the performance of yourself and others
Subject specific skills
- Use of such knowledge in modelling and design
- Problem solving strategies
- Deploy theory in design, implementation and evaluation of systems
- Specify, design or construct computer-based systems
- Deploy tools effectively
- Development of general transferable skills
- Knowledge of systems architecture
- Defining problems, managing design process and evaluating outcomes
- Knowledge and/or understanding of appropriate scientific and engineering principles
- Knowledge and understanding of computational modelling
- Principles of appropriate supporting engineering and scientific disciplines
Pre- and Co-requisite Modules
Courses including this module
Compulsory in courses:
- H612: BEng Computer Systs Eng (3 yrs) year 1 (BENG/CSE)
- H61B: BEng Computer Sys Engineering (4yr with Incorp Foundation) year 1 (BENG/CSE1)
- H610: BENG Electronic Engineering (3 yrs) year 1 (BENG/ELE)
- H62B: BEng Electronic Engineering (4yr with Incorp Foundation) year 1 (BENG/ELE1)
- H621: BEng Electronic Engineering with International Experience year 1 (BENG/ELEIE)
- G400: BSC Computer Science year 1 (BSC/CS)
- G40B: BSc Computer Science (4 year with Incorporated Foundation) year 1 (BSC/CS1)
- H64B: BSc Computer Sys Engineering (4yr with Incorp Foundation) year 1 (BSC/CSE1)
- H603: BSc Computer Systems Engineering year 1 (BSC/CSENG)
- I102: BSc Computer Science (with International Experience) year 1 (BSC/CSIE)
- GW49: BSC Creative Technologies year 1 (BSC/CT)
- H611: BSc Electronic Engineering year 1 (BSC/ELE)
- H63B: BSc Electronic Engineering (4yr with Incorp Foundation) year 1 (BSC/ELE1)
- H661: MEng Control and Instrumentation Engineering year 1 (MENG/CIE)
- H660: MEng Critical Safety Engineering year 1 (MENG/CRSEN)
- H617: MEng Computer Systs Eng (4 yrs) year 1 (MENG/CSE)
- H619: MEng Computer Systems Engineering (with International Exper) year 1 (MENG/CSEIE)
- H601: MEng Electronic Engineering (4 yrs) year 1 (MENG/EE)
- H618: MEng Electronic Engineering with International Experience year 1 (MENG/EEIE)