Exam June 2017, questions PDF

Title Exam June 2017, questions
Course C Programming and Embedded Systems
Institution University of Essex
Pages 6
File Size 227.1 KB
File Type PDF
Total Downloads 102
Total Views 156

Summary

Exam June 2017, questions...


Description

CE243-5-AU UNIVERSITY OF ESSEX Undergraduate Examinations 2017

C PROGRAMMING AND EMBEDDED SYSTEMS

Time allowed: TWO hours

Candidates are permitted to bring into the examination room: Casio FX-83GT Plus or Casio FX-85GT Plus ONLY

Candidates must answer ALL questions.

The paper consists of FOUR questions.

All questions are of equal weight.

The percentages shown in brackets provide an indication of the proportion of the total marks for the PAPER which will be allocated.

Please do not leave your seat unless you are given permission by an invigilator. Do not communicate in any way with any other candidate in the examination room. Do not open the question paper until told to do so. All answers must be written in the answer book(s) provided. All rough work must be written in the answer book(s) provided. A line should be drawn through any rough work to indicate to the examiner that it is not part of the work to be marked. At the end of the examination, remain seated until your answer book(s) have been collected and you have been told you may leave.

2

CE243-5-AU Question 1 Study the following program: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

#include main(void) { int base, number, output; char ch, baseCh; while (1) { scanf("%d", &base); if ((base < 2) || (base > 10)) break; number = 0; output = 0; baseCh = (base - 1) + '0'; do { ch = getchar(); } while ((ch < '0') || (ch > baseCh)); while ((ch >= '0') && (ch...


Similar Free PDFs