Question 5 2021 · May-June · Paper 42 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 5
Question 1
mark for each completed statement (in bold)
Question 5
Show text version of question
Question 5
The following procedure performs an insertion sort on the global array TheArray that has 10 elements.
Complete the pseudocode for the procedure InsertionSort().
PROCEDURE InsertionSort()
DECLARE Count : INTEGER
DECLARE Counter : INTEGER
DECLARE Temp : INTEGER
Count ..............................................
WHILE Count < 10
Temp TheArray[Count]
Counter Count .................................................
WHILE ........................... >= 0 AND TheArray[Counter] > ...................................
TheArray[Counter + 1] TheArray[Counter]
Counter Counter - 1
ENDWHILE
TheArray[..............................................] Temp
Count Count + 1
ENDWHILE
ENDPROCEDURE
Question 16
Why this question appears here
71% 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_42.pdf
