Quelpr

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

Write a C function which accepts an integer array and an integer variable indicating the size of the array. The function should return a count of the numbers in the array that are LESS THAN 20.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 5(a)(i)A stream of characters making up the source program is read from left to right and grouped into tokens.[1 mark]
  2. 5(a)(ii)A piece of code is transformed to make it more efficient without changing its output or side effects.[1 mark]
  3. 5(b)Explain the role of a 'watch' in programming.[2 marks]
  4. 5(d)Write a C program that determines and outputs to a file, "funds.txt", the total funds raised and how many donations were made. (You may not use arrays in your…[15 marks]

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