This course provides an gradual but in-depth introduction to imperative programming using the C programming language. 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%).
CP/CPMT is taught in semester 1. It is taught as a combination of two Lectures:
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. Details (especially of later lectures) are likely to change a bit.
This year lectures are being recorded. The recording of Lectures 2, 4, and 5 failed to capture the slides (so only provide audio, and a video filmed from the back of the lecture theatre), but the recording of all other lectures succeeded in capturing everything. There are links to all CP videos on this webpage.
|Meeting||Day||Date||Who||Where||Title||Slides & Handouts||Code|
|1.||Monday||16 Sept||Mary/Julian||AT LT3||Introduction to CP||sl1, sl1x4||hello.c|
|2.||Tuesday||17 Sept||Mary||AT LT2||Imperative programming, operations, errors||sl2, sl2x4|
|Lab 1||Thurs 19 or Mon 23||Mary+/Julian+||AT4.12||Intro to the DICE Environment||lab1.pdf, unix.pdf, emacs.pdf|
|3.||Monday||23 Sept||Mary||AT LT3||Variables and ints||sl3, sl3x4||square.c, max.c|
|4.||Tuesday||24 Sept||Mary||AT LT2||Arithmetic operations, int, float, double||sl4, sl4x4||floats.c, quadratic.c|
|Lab 2||Thurs 26 or Mon 30||Mary+/Julian+||AT4.12||Simple arithmetic problems||lab2.pdf|
|Tutorial||Tutor||week 3 sheet||tutwk3.pdf, tutsoln3 as .txt (or .pdf)||tutw3b.c, tutw3c.c|
|5.||Monday||30 Sept||Mary||AT LT3||arithmetic, if-statement(cont.)||sl5, sl5x4||quadratic1.c, quadratic2.c|
|6.||Tuesday||1 Oct||Mary||AT LT2||iteration: for and while||sl6, sl6x4||table.c, fib.c, fib-for.c, lect6code.tar|
|Lab 3||Thurs 3 or Mon 7||Mary+/Julian+||AT4.12||Programming, with some iteration||lab3.pdf|
|Tutorial||Tutor||week 4 sheet||tutwk4.pdf, tutsoln4.pdf||week4sol.tar|
|7.||Monday||7 Oct||Mary||AT LT3||Functions||sl7, sl7x4||triangle.c|
|8.||Tuesday||8 Oct||Mary||AT LT2||Functions 2||sl8, sl8x4||scope.c, scope2.c|
|Lab 4||Thurs 10 or Mon 14||Julian+/Mary+||AT4.12||Simple Graphics with descartes||lab4.pdf, lab4sl.pdf||lab4.tar|
|Tutorial||Tutor||week 5 sheet||tutwk5.pdf tutsoln5.pdf||tutw5c.c|
|9.||Monday||14 Oct||Julian||AT LT3||Arrays||sl9, sl9x4||fib-arr.c, whatday3.c|
|10.||Tuesday||15 Oct||Julian||AT LT2||Practical Programming||sl10, sl10x4||base.c|
|Lab 5||Thurs 17 or Mon 21||Mary+/Julian+||AT4.12||Functions, some pointers, some arrays||lab5.pdf|
|Tutorial||Tutor||week 6 sheet||tutwk6.pdf, t6sol.txt||fbase.c|
|11.||Monday||21 Oct||Julian||AT LT3||scanf in more detail; char||sl11, sl11x4|
|12.||Tuesday||22 Oct||Julian||AT LT2||Strings||sl12, sl12x4|
|Lab 6||Thur 24 or Mon 28||Mary+/Julian+||AT4.12||Arrays and some strings||lab6.pdf|
|Tutorial||Tutor||week 7 sheet||tutwk7.pdf, t7sol.txt|
|13.||Monday||28 Oct||Julian||AT LT3||Structured Data||sl13, sl13x4|
|14.||Tuesday||29 Oct||Julian||AT LT2||Structured Data, cont.; enums; switch|
|Lab 7||Thurs 31 or Mon 4||Mary+/Julian+||AT4.12||Structured data types||lab7.pdf||running.c|
|Tutorial||Tutor||week 8 sheet||tutwk8.pdf tutsoln8.pdf||bubblesort.c, mergerec.c, week8sol.tar|
|15.||Monday||4 Nov||Mary||AT LT3||Searching and sorting||sl15, sl15x4||search.c, bubblesort.c,|
|16.||Tuesday||5 Nov||Mary||AT LT2||Recursion (including mergesort)||sl16, sl16x4|
|Lab||Thur 7 or Mon 11||Mary+/Julian+||AT4.12||mock exam|
|Tutorial||Tutor||week 9 sheet||tutwk9.pdf, tut9notes.txt||sidebyside.c|
|17.||Monday||11 Nov||Mary/Julian||AT LT3||MergeSort/Libraries and Separate Compilation||sl17, sl17x4|
|18.||Tuesday||12 Nov||Julian||AT LT2||Files in C||sl18, sl18x4|
|Lab 8||Thur 14 or Mon 18||Mary+/Julian||AT4.12||Recursion and some File work||lab8.pdf|
|Tutorial||Tutor||Mock exam Qs; Files and Arguments||see prev sheet|
|19.||Monday||18 Nov||Julian||AT LT3||Program Arguments, More C; Mock exam feedback||sl19, sl19x4, slM, slMx4|
|20.||Tuesday||19 Nov||Mary||AT LT2||Some past exam Questions||Aug12 paper||files|
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 15th 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: email@example.com
Please contact our webadmin with any comments or corrections. Logging and Cookies
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh