Quelpr

CAPE Computer Science Unit 1 · 2013 · Paper 2 · Question 6(d)(i)

Write a C declaration for a struct to store a customer record consisting of a customer ID (integer) and customer balance (float).

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 6(a)Identify and briefly describe any TWO programming paradigms.[4 marks]
  2. 6(b)Explain ONE reason why programming language implementations used on mobile devices are different from those for desktop computers.[2 marks]
  3. 6(c)Determine the exact output produced when the given C program is executed.[6 marks]
  4. 6(d)(ii)Declare two struct variables representing customers Andrew and Jamie, and initialise their fields with the values: Andrew (ID: 1200, Balance: 1000) and Jamie…[4 marks]
  5. 6(d)(iii)Write C code to read two values representing the purchases of Andrew and Jamie from the keyboard. Andrew pays full price while Jamie receives a 10% discount.…[3 marks]
  6. 6(d)(iv)Write C code to interchange the records of Andrew and Jamie.[3 marks]

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