Module Specification

The information contained in this module specification was correct at the time of publication but may be subject to change, either during the session because of unforeseen circumstances, or following review of the module at the end of the session. Queries about the module should be directed to the member of staff with responsibility for the module.
Title Introduction to Programming in C
Code ELEC129
Coordinator Dr M Lopez-Benitez
Electrical Engineering and Electronics
M.Lopez-Benitez@liverpool.ac.uk
Year CATS Level Semester CATS Value
Session 2022-23 Level 4 FHEQ First Semester 15

Aims

Despite the popularity of newer languages such as C++ and Java the C language remains a core skill in the software business ranking in the top ten desired skills. C is one of the most popular languages for programming embedded systems that are found in automobiles, cameras, DVD players and many other modern appliances. This module aims to enable students to: Learn and use the C programming language Use the C language to solve real engineering problems Acquire fundamental software development skills covering program design, coding and testing


Pre-requisites before taking this module (other modules and/or general educational/academic requirements):

 

Co-requisite modules:

 

Learning Outcomes

(LO1) Knowledge of the C programming language

(LO2) Knowledge of general programming concepts

(LO3) Knowledge of the role and functions of the hardware and software components of a computer

(LO4) Understanding of the software development process

(S1) General transferable skills: On successful completion of the module, students should be able to demonstrate enhancement of the following key transferable skills: Independent learning; Problem solving and design skills.

(S2) Practical skills: On successful completion of the module, the students are expected to: Be able to use the C++ compiler on the University computer networks to code, compile and run programs written in C; Be able to design modular programs following the top-down function-oriented approach; Be able to code an algorithm using the (ANSI) C language.

(S3) Intellectual abilities: On successful completion of the module, the students should demonstrate ability in applying the knowledge accumulated during lectures and laboratory classes to: Design, code, test and document computer programs that meet the requirements supplied in a specification; Analyse and understand existing code written in C; Modify and enhance existing programs written in C; Determine and correct the sources of errors that occur during compilation, run-time errors and logical (design) errors.


Syllabus

 

Module info & Introduction:
Overview of the course. Introduction to the basic elements of a computer: hardware and software.Overview of computer programming: machine vs. high-level languages. The six steps of the software development method: problem specification, analysis, design, implementation, testing and maintenance/update. Introduction to the C programming language.

Basics of C Programming:
Anatomy of a C program. Syntax rules and vocabulary. Tokens: reserved words/keywords, identifiers (variables, data types and type conversion/casting), constants, string literals, punctuators and operators (arithmetic and assignment operators). Sources and types of programming errors: syntax errors, run-time errors and logic errors. Appendix: The binary numeral system.

Strings and Formatted Input/Output
Software development method: case study. Introduction to arrays. Character arrays and strings (string functions). Basic I/O functions.

Functions:
Concept of function. Reasons for using functions. Use of functions (declaration,definition and call). Formal parameters, actual arguments and return values. Execution flow with functions. Argument passing methods (by value and by reference). Introduction to pointers (concept and declaration). Indirection and address operators. Using pointer variables as function arguments. Appendix: Case study with functions.

Flow Control I -Conditional Execution:
Concept of flow and flow control (sequential, conditional and iterative execution). Conditional execution (branching). Conditional test expressions. Relational and logical operators. Conditional flow control statements. Nested conditional statements.

Flow Control II - Iterative Execution:
Concept of flow and flow control (reminder). Iterative execution (looping). Iterative flow control statements. Counting vs. indefinite loops. Entry-condition vs.exit-condition loops. Choosing the right loop type. Interrupting loops. Nested loops .

Pointers and Arrays I:
Pointers (concept, declaration). Indirection and address operators. Pointer operations(assignment, dereferencing, pointer’s address, comparison, incrementing/decrementing and differencing). Arrays (concept, declaration,access, initialisation and protection). Relation between pointers and arrays (accessing array elements with pointers). Relation between pointers and strings.

Pointers and Arrays II:
Multidimensional arrays (concept, declaration, access and initialisation). Relation between pointers and multidimensional arrays (accessing multidimensional array elements with pointers, pointers to multidimensional arrays). Functions with pointers and arrays (array processing functions). Dynamic memory management (memory allocation, reallocation and deallocation). Dynamically sized arrays. Appendix:Arrays of strings.

File Input/Output:
Concept and types of files (binary vs. text views). File functions. Opening files. Reading from/ writing to files (binary and text modes). Sequential vs. random access. Closing files.

Structures and Unions:
Scope of a variable (local vs. global variables). Structures (concept, declaration,definition, initialisation and access). Arrays of structures. Pointers to structures. Functions with structures as arguments (by value and by reference).Files and structures (writing/reading structures to/from files). Unions.

Appendix: Other topics
Preprocessor directives. Bit-level operations. Data type related topics. Function related topics. C standard library. Post-ANSI C features. C reference sources.


Teaching and Learning Strategies

Due to Covid-19, one of the following delivery methods will be implemented based on the current local conditions.

(a) Hybrid delivery, with social distancing on Campus

Teaching Method 1 – Online asynchronous lectures
Description: Lectures to explain the course material
Attendance recorded: No
Notes: 1-2 hours per week
Teaching Method 2 – Online asynchronous tutorials
Description: Programming tutorials with practical examples
Attendance recorded: No
Notes: 1-2 hours per week
Teaching Method 3 – Online synchronous laboratory work
Description: Supervised laboratory sessions to work on lab booklet examples/exercises and assignments.
Attendance recorded: No
Notes: 3 hours of online supervised lab work per week where students can contact demonstrators to provide support.

(b) Fully online delivery and assessment

Teaching Method 1 – Online asynchronous lectures
Description: Lectures to ex plain the course material
Attendance recorded: No
Notes: 1-2 hours per week
Teaching Method 2 – Online asynchronous tutorials
Description: Programming tutorials with practical examples
Attendance recorded: No
Notes: 1-2 hours per week
Teaching Method 3 – Online synchronous laboratory work
Description: Supervised laboratory sessions to work on lab booklet examples/exercises and assignments.
Attendance recorded: No
Notes: 3 hours of online supervised lab work per week where students can contact demonstrators to provide support.

(c) Standard on-campus delivery with minimal social distancing

Teaching Method 1 – Lectures
Description: Lectures to explain the course material
Attendance recorded: Yes
Notes: 1-2 hours per week
Teaching Method 2 – Tutorials
Description: Programming tutorials with practical examples
Attendance recorded: Yes
Notes: 1-2 hours per week
Teaching Method 3 &# x2013; Laboratory work
Description: Supervised laboratory sessions to work on lab booklet examples/exercises and assignments.
Attendance recorded: Yes
Notes: 3 hours of supervised lab work per week where students can contact demonstrators to provide support.


Teaching Schedule

  Lectures Seminars Tutorials Lab Practicals Fieldwork Placement Other TOTAL
Study Hours 20

    36

    56
Timetable (if known)              
Private Study 94
TOTAL HOURS 150

Assessment

EXAM Duration Timing
(Semester)
% of
final
mark
Resit/resubmission
opportunity
Penalty for late
submission
Notes
             
CONTINUOUS Duration Timing
(Semester)
% of
final
mark
Resit/resubmission
opportunity
Penalty for late
submission
Notes
(129) Assessment 3 Standard UoL penalty applies for late submission. This is an anonymous assessment. Assessment Schedule (When): Week 14    50       
(129.1) Assessment 2 Standard UoL penalty applies for late submission. This is an anonymous assessment. Assessment Schedule (When): Week 9    35       
(129.2) Assessment 1 Standard UoL penalty applies for late submission. This is an anonymous assessment. Assessment Schedule (When): Week 5    15       

Reading List

Reading lists are managed at readinglists.liverpool.ac.uk. Click here to access the reading lists for this module.