Past-paper question · 2024 October-November · Paper 21 · Q6(c)

Question 6(c) 2024 · October-November · Paper 21 · 3 marks

Original past-paper question for 6(C)
Original past-paper question for 6(C)
Reveal official mark-scheme answer Official mark-scheme answer for 6(C)

Official answer for Question 6

Part (c)

✓
One mark for a meaningful identifier for the array

Question 3

✓
A MyArray
✓
One mark for 2 meaningful identifiers, Two marks for 3 meaningful identifiers:
✓
T Counter
✓
C Index
✓
I Total
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_w24_ms_21.pdf →

Show text version of question

Question 6

Part (c)

Question 6

An incomplete algorithm has been written in pseudocode to count the number of zeros stored in

an array and total the non-zero values.

01 DECLARE A[1:50] : INTEGER 02 DECLARE C : INTEGER 03 DECLARE I : INTEGER 04 DECLARE T : INTEGER 05 I ← 0

06 ........................................................................................................ 07 FOR C ← 1 TO 50 08 IF A[C] .............................................................................. 09 THEN 10 T ← T + 1 11 ELSE 12 I ← I + A[C] 13 ENDIF

14 ........................................................................................................

Part (c)

Meaningful identifiers have not been used in the algorithm.

Suggest suitable meaningful identifiers for:

The array:

A
..............................................................................................................................................

The variables:

T ................................................................................................................................................

C
................................................................................................................................................

I ................................................................................................................................................

[3]

Question 5

, ,

Topic relevance

Why this question appears here

52% assigned-topic match · Programming › Programming concepts

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 0478_w24_qp_21.pdf

Keep practising this topic