Past-paper question · 2023 May-June · Paper 32 · Q6(b)

Question 6(b) 2023 · May-June · Paper 32 · 5 marks

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

Official answer for Question 6

Part (b)

✓
One mark for each correctly completed line (Max 5)

Question 5

✓
DECLARE DentalRecord : ARRAY[1:250] OF TAppointments
✓
DECLARE DentalFile : STRING
✓
DECLARE Count : INTEGER
✓
DentalFile "DentalFile.dat"
✓
OUTPUT "The file ", DentalFile, " contains these records:"
✓
OPENFILE DentalFile FOR RANDOM
✓
Count 1
✓
REPEAT
✓
SEEK DentalFile, Count
✓
GETRECORD DentalFile, DentalRecord[Count]
✓
OUTPUT DentalRecord[Count]
✓
Count Count + 1
✓
UNTIL EOF(DentalFile)
✓
CLOSEFILE DentalFile
✓
Question
✓
Answer
✓
Marks

Mark scheme 9618_s23_ms_32.pdf →

Show text version of question

Question 6

Part (b)

This pseudocode algorithm reads dental records stored in a random file using the user‑defined data type TAppointments and prints the contents of the file, one record at a time. Complete this file handling pseudocode: DECLARE DentalRecord : ARRAY[1:250] OF TAppointments DECLARE DentalFile : STRING DECLARE Count : INTEGER DentalFile "DentalFile.dat" OUTPUT "The file ", DentalFile, " contains these records:" OPENFILE ................................................................................................................. ..........................................................................................

Question 1

REPEAT SEEK DentalFile, Count ..................................................................................................................... OUTPUT DentalRecord[Count] Count Count + 1 .....................................................................(DentalFile) .............................................................................................

[5]

Question 8

Topic relevance

Why this question appears here

82% 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 9618_s23_qp_32.pdf

Keep practising this topic