Question 8(a) 2023 · October-November · Paper 22 · 15 marks
Reveal official mark-scheme answer
Official answer for Question 8
Part (a)
Question 7
Question 4
Question 5
Question 6
Question 7
Show text version of question
Question 8
Part (a)
Question 8
Question 7
Part (b)
The original linked list is to be modified. A new node D6 is inserted between nodes D32 and
D11.
Ptr1 D40 D32 D11 D100 Ø
Ptr2 F1 F2 F3 F4 Ø
The algorithm required is expressed in four steps as shown.
Complete the steps.
1. Assign the data item .................................. to .................................. .
2. Set the .................................. of this node to point to .................................. .
3. Set Ptr2 to point to .................................. .
4. Set pointer of .................................. to point to .................................. .
Question 8
4 A procedure Count() will:
1. input a value (all values will be positive integers) 2. count the number of odd values and count the number of even values 3. repeat from step 1 until the value input is 99 4. output the two count values, with a suitable message.
The value 99 must not be counted.
Part (a)
Write pseudocode for the procedure Count().
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 9
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 9618_w23_qp_22.pdf
