Question 7(b) 2013 · May-June · Paper 33 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 7
Part (b)
Part (b)
Show text version of question
Question 7
Part (b)
Question 7
A user-defined function FoundBigger is defined, using pseudocode, as follows: For
Examiner's Use
FUNCTION FoundBigger(ThisArray : INTEGER, UBound : INTEGER, ThisValue : INTEGER) RETURNS BOOLEAN
The function checks each element in the array ThisArray with upper bound UBound. The function returns a Boolean value to show if ThisValue is bigger than any of the values in ThisArray. If the function is incorrectly formed it will give a ‘COMPILE ERROR’.
The function is used with the three arrays shown below:
Subscript/Index Identifier 1 2 3 4 5 6 7 8 9 10
List1 17 0 23 11 16 4
List2 13 16 16 0 20 22 20 19 11 23
List3 41 29 34 39 39 44 0
Part (b)
A programmer writes pseudocode to calculate an employee’s net pay with a function For
CalcNetPay. Examiner's Use
The calculation is done using:
- Employee’s pay grade (a single character: F, P or C)
- Hours worked that week
Show the function header for CalcNetPay.
Why this question appears here
94% assigned-topic match · Data types and structures › Data types and records
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s13_qp_33.pdf
