Quelpr

CAPE Computer Science Unit 1 · 2011 · Paper 2 · Question 5(c)

Write a C function which accepts an integer array and an integer variable indicating the size of the array, and returns the sum of all numbers in the array that are NOT greater than 100.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 5(a)Apart from intermediate code generation, list TWO other stages of the translation process.[2 marks]
  2. 5(b)Give TWO advantages of using a modular approach in programming.[2 marks]
  3. 5(d)Write a C program that reads the jellybean contest data from 'contest.txt' and outputs to 'winner.txt' the winning guess and member ID code (without using…[15 marks]

More practice: the rest of this paper · more Procedural Programming Constructs in C questions · all CAPE Computer Science Unit 1 past papers