Quelpr

CAPE Computer Science Unit 1 · 2013 · Paper 2 · Question 5(a)

Questions on compilers/interpreters, C array manipulation, file I/O, and factorial calculation.

Explain TWO differences between compilers and interpreters.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 5(b)Write a function swap that accepts an integer array and two valid integers pos1 and pos2 representing locations in the array, and swaps the contents of these…[4 marks]
  2. 5(c)Write a C program that reads two space-separated integers from a text file named 'in.dat', then prints them in reverse order followed by their sum and product.[7 marks]
  3. 5(d)Write a program that prompts the user to enter an integer r and prints r!, where 0! = 1 and r! = r(r-1)(r-2)...1 for r > 0.[8 marks]

More practice: the rest of this paper · more Programming Paradigms and Translation questions · all CAPE Computer Science Unit 1 past papers