Question 4(b) 2021 · May-June · Paper 22 · 7 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (b)
Question 7
Question 4
Question 5
Question 6
Show text version of question
Question 4
Part (b)
Part (b)
A program contains a global 2D array XRef. The array consists of 100 rows and 3 columns.
The array is of data type STRING.
integer value.
The function returns:
- the index number of the first row where:
- the element in column 1 of that row matches Par1 and
- either of the other two elements in that row match Par2
- –1 if no match found in any row.
Question 9
Write program code for the function Search().
Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement for each variable used with its data type.
Programming language .............................................................................................................
Program code
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 10
Why this question appears here
82% assigned-topic match · Programming › Constructs
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 9608_s21_qp_22.pdf
