The Mock Exam

The mock exam paper is mock.pdf.

The technical instruction sheet is instructions.pdf.

The C aide-memoire is cref.pdf.

The template files required are chardemo.c, maxtofront.c, piglatin.c.

Your answers and results can be downloaded from here. If you are not accessing this from within DICE, you will be asked to log in with your DICE (not EASE!) login.

As remarked in the feedback lecture, there are some comments applicable to quite a few people, such as:

Some people haven't got the basic idea of functions. When they were supposed to be completing a function that does something with its argument (e.g. mailType), they put code in the function to query the user for the data that is in the argument. It's hard to see how one can get through the labs still maintaining this problem. If this is you, go back and review functions.

Similarly, some people get confused about a function doing something, and printing something. In B1, isVowel() tells you something about its argument by returning a value; rotateWord changes its argument; and printPig is specified to print a transformed version of its argument (*not* to change its argument). If you printed anything in (a) and (b) (except for debugging), you were wrong; and if you didn't print anything in (c), you were wrong - though for (c), I counted it only as a minor bug if you changed the argument instead of printing a changed version.

In B1(c), some people printed the word with a newline after it -- and some people printed other stuff as well. The question did not tell you to print a newline, and there's no reason why you should think it necessary. This counted as a minor bug.

The solutions to the questions are: chardemo-sol.c, maxtofront-sol.c, band-sol.c, piglatin-sol.c.

Home : Teaching : Courses : Cp 

Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail:
Please contact our webadmin with any comments or corrections. Logging and Cookies
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh