This course provides an gradual but in-depth introduction to imperative programming using the C programming language. It is intended for students who are not taking Computer Science/Artificial Intelligence as part of their degree. Our lectures (2 a week) are backed up with a scripted (and supervised) two-hour Lab and a one-hour tutorial, every week. The assessment will be based on a 3-hour online programming exam in December (worth 90%) and one coursework due in week 9 (10%).
For the past main diet exams (and one re-sit), we have made available the template files and also the automarker that was used to mark the exam:
The Year Organizer, who is the person who grants extensions, is Paul Anderson.
The class rep for 2016/17 is volunteer please!.
CP/CPMT is taught in semester 1. It is taught as a combination of two Lectures:
Problems with Lab/Tutorial allocations should be sent to Gregor Hall (email@example.com).
Some students report security warnings when they try to access this link. This is because the University certifies its own secure pages, rather than using a commercial provider. Most Internet browsers will offer an link to bypass the security-warning, if you look closely. If you really can't see a way to do that, try a different browser (eg switch from Explorer and try with Chrome instead). You will see this problem with all University secure sites if you access them from a private machine, so it's worth installing the University's certificate in your browser. For instructions on this, see Information Services' page.
It also includes a 1-hour Tutorial (from week 3 onwards).
We will keep a log of our lectures, and the collection of log entries will be maintained here. Individual log entries (once written) will be available as direct links from the lecture titles in the schedule below.
|Meeting||Day||Date||Who||Where||Title||Slides & Handouts||Code|
|1.||Monday||19 Sept||JCB/KH/MM||AT.LT3||Introduction to CP (log)||sl1, sl1x4||hello.c|
|2.||Tuesday||20 Sept||JCB||DHT.LHA.||Imperative programming, operations, errors (log)||sl2, sl2x4|
|Lab 1||Thur22/Mon26/Tues27||FH 3.D02||Intro to the DICE Environment (log)||lab1.pdf, lab1-2up.pdf, fwunixref.pdf, emacs.pdf|
|3.||Monday||26 Sept||JCB||AT.LT3||Variables and ints (log)||sl3, sl3x4||square.c, max.c|
|4.||Tuesday||27 Sept||JCB||DHT.LHA||Arithmetic operations, int, float, double (log)||sl4, sl4x4||floats.c, quadratic.c|
|Lab 2||Thur29/Mon3/Tues4||tbc||FH 3.D02||Simple arithmetic problems (log)||lab2.pdf, lab2-2up.pdf|
|Tutorial||Tutor||week 3 sheet||tutwk3.pdf t3sol.txt tutsoln3.pdf||tutw3b.c, tutw3c.c|
|5.||Monday||3 Oct||tbc||AT.LT3||arithmetic, if-statement(cont.) (log)||sl5, sl5x4||quadratic.c, quadratic2.c|
|6.||Tuesday||4 Oct||tbc||DHT.LHA||iteration: for and while (log)||sl6, sl6x4||table.c, fib.c, fib-for.c, lect6code.tar|
|Lab 3||Thur6/Mon10/Tues11||tbc||FH 3.D02||Programming, with some iteration (log)||lab3.pdf|
|Tutorial||Tutor||week 4 sheet (log)||tutwk4.pdf tutsoln4.pdf||week4sol.tar|
|7.||Monday||10 Oct||tbc||AT.LT3||Functions (log)||sl7, sl7x4||triangle.c|
|8.||Tuesday||11 Oct||tbc||DHT.LHA||Functions 2 (log)||sl8, sl8x4||scope.c, scope2.c|
|Lab 4||Thur13/Mon17/Tues18||tbc||FH 3.D02||Simple Graphics with descartes (log)||lab4.pdf lab4sl.pdf||lab4.tar|
|Tutorial||Tutor||week 5 sheet||tutwk5.pdf tutsoln5.pdf||tutw5b.c|
|9.||Monday||17 Oct||MM||AT.LT3||Arrays (log)||sl9, sl9x4||fib-arr.c, whatday3.c|
|10.||Tuesday||18 Oct||JCB||DHT.LHA||Practical Programming (log)||sl10, sl10x4, Extra video lecture (10 mins, 30 MB)||base-endoflecture.c, base.c|
|Lab 5||Thur20/Mon24/Tues25||tbc||FH 3.D02||Functions, some pointers, some arrays (log)||lab5.pdf|
|Tutorial||Tutor||week 6 sheet||tutwk6.pdf t6sol.txt||base.c fbase.c|
|11.||Monday||24 Oct||MM||AT.LT3||scanf in more detail; char (log)||sl11, sl11x4||roman.c,charstuff.c|
|12.||Tuesday||25 Oct||MM||DHT.LHA||Strings (log)||sl12, sl12x4||hiyacoders.c|
|Lab 6||Thur27/Mon31/Tues1||tbc||FH 3.D02||Arrays and some strings||lab6.pdf|
|Tutorial||Tutor||week 7 sheet||tutwk7.pdf|
|13.||Monday||31 Oct||MM||AT.LT3||Structured Data (log)||sl13, sl13x4|
|14.||Tuesday||1 Nov||MM||DHT.LHA||Structured Data, cont.; enums; switch (log)|
|Lab 7||Thur3/Mon7/Tues8||tbc||FH 3.D02||Structured data types||lab7.pdf||running.c|
|Tutorial||Tutor||week 8 sheet||tutwk8.pdf||bubblesort.c, mergerec.c|
|15.||Monday||7 Nov||tbc||AT.LT3||Searching and sorting (log)||sl15, sl15x4||search.c, bubblesort.c|
|16.||Tuesday||8 Nov||tbc||DHT.LHA||Recursion (including mergesort) (log)||sl16, sl16x4|
|Lab||Thur10/Mon14/Tues15||tbc||FH B.LT1||mock exam|
|Tutorial||Tutor||week 9 sheet||tutwk9.pdf|
|17.||Monday||14 Nov||tbc||AT.LT3||Libraries and Separate Compilation||sl17, sl17x4|
|18.||Tuesday||15 Nov||tbc||DHT.LHA||Files in C||sl18, sl18x4|
|Lab 8||Thur17/Mon21/Tues22||tbc||FH 3.D02||Recursion and some File work||lab8.pdf|
|Tutorial||Tutor||Mock exam Qs; Files and Arguments||see prev sheet|
|19.||Monday||21 Nov||tbc||AT.LT3||Program Arguments, More C; Mock exam feedback||sl19, sl19x4 , slM, slMx4||arg.c|
|20.||Tuesday||22 Nov||tbc||DHT.LHA||Some past exam Questions|
|Lab 9||Thur24/Mon28/Tues30||tbc||FH 3.D02||past exam papers||Dec 2011|
Your grade for CP will depend on two components. The first part will be a single electronically-submitted piece of coursework, due by 4pm, Friday 20th November (end week 9). This work is worth 10% of your overall grade. The second is the final exam, carried out as a computer-based programming test held in the computer labs, taking place at the the end of semester 1. This final exam is worth 90% of your overall grade.
The (due end week 9) coursework must also be completed by CMPT students and is worth 10% of their grade also. However, the weighting of the exam is slightly different - it is worth only 70%, with the remaining 20% depending on the extra piece of practical work for CPMT students, done with the Music department in week 11.
"A Book on C: Programming in C", 4th edition; by Al Kelley and Ira Pohl.
Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: firstname.lastname@example.org
Please contact our webadmin with any comments or corrections. Logging and Cookies
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh