Quelpr

Other parts of this question

  1. 5(b)Write a C function which accepts a positive integer, n, and returns 2^n. State any assumptions made.[7 marks]
  2. 5(c)(i)Write C code to store the even numbers from 2 (inclusive) to 40 (inclusive) in a file called "num.dat".[7 marks]
  3. 5(c)(ii)Write C code to read the integers from the file "num.dat" created in (c)(i), add 5 to each integer and print the result on the screen.[5 marks]

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