Indicative Content |
Introduction.
Basic syntax. Compiled vs. interpreted languages. The C-compiler application. Stages: Pre-processing, compilation and linking. Circular dependencies. Makefiles.
|
Memory Perspective.
Hexadecimal representation. Virtual memory: Static-based data and code areas vs. dynamic-based stack and heap. Heap memory management: Malloc, free and realloc. Memory debugging tools.
|
Pointers.
Definitions and operatiors. Void, non-initialised and null pointers. Maths with pointers. Pointer as function arguments. Pointer to pointers. Pointer to functions.
|
Arrays.
Declaration and initialisation. Equivalence of arrays and pointers. Array limitations. Functions and arrays. Multi-dimensional arrays.
|
Strings and Input/Output (I/O) APIs
Main API. Variable-length argument programs. Reading and writing characters and lines. Parsing text and formatted files.
|
User-defined Data Types.
Structs. Fields access and manipulation. Compound structs. Structs and dynamic data structures. Struct pointers for isolating data usage from data internal representation.
|
Language Spectrum
High, mid and low-level languages. Positioning C vs. a low-level language as assembly and a high-level language as Java or Python.
Assembly and machine architecture: Registers, Memory Allocation, System Calls, Data Transfer, Memory Stack, Labels and Branches.
Use 'asm' to embed assembler instructions within a C program to control the use of registers and system calls.
|
The University reserves the right to alter the nature and timings of assessment
Module Resources
|
Recommended Book Resources |
---|
-
Zed A. Shaw. (2015), Learn C the Hard Way: Practical Exercises on the Computational Subjects You Keep Avoiding (Like C), Addison-Wesley Professional, [ISBN: 9780133124385].
-
Richard Reese. (2013), Understanding and Using C Pointers, O'Reilly Media, [ISBN: 9781449344184].
|
Supplementary Book Resources |
---|
-
Brian W. Kernighan, Dennis M. Ritchie. (1988), The C programming language, Prentice Hall, [ISBN: 9780131103627].
-
Peter Prinz and Ulla Kirch-Prinz. (2003), C Pocket Reference - C Syntax and Fundamentals, O'Reilly Media, [ISBN: 9780596004361].
-
Daniel Kusswurm. (2014), Modern X86 Assembly Language Programming: 32-bit, 64-bit, SSE, and AVX, Apress, [ISBN: 9781484200650].
|
This module does not have any article/paper resources |
---|
Other Resources |
---|
-
Website, C Tutor - Visualize C code execution to
learn C online,
-
Website, C reference - cppreference.com - C/C++
Reference,
-
Website, Simple 8-bit Assembler Simulator,
|