Past-paper question · 2015 October-November · Paper 22 · Q1(e)

Question 1(e) 2015 · October-November · Paper 22 · 5 marks

Original past-paper question for 1(E)
Original past-paper question for 1(E)
Original past-paper question for 1(E)
Reveal official mark-scheme answer Official mark-scheme answer for 1(E)

Official answer for Question 1

Part (e)

Part (e)

Mark as follows:

  • Open file BookData.DAT
  • … for writing/output/append
  • test for book data // test this is not a dummy record
  • write record to file
  • correctly working loop (FOR/WHILE/REPEAT)
  • Close file BookData.DAT (or channel number)
✓
Example pseudocode:
✓
OPENFILE BookData.DAT FOR WRITING
✓
i 1
✓
WHILE i <= 100
✓
IF Book[i].Title > "" // accept any field and its dummy value
✓
THEN
✓
WRITE record to FILE
✓
ENDIF
✓
i i + 1
✓
ENDWHILE
✓
CLOSEFILE BookData.DAT
✓
[Max 5]
✓
EOF returns TRUE or FALSE

Mark scheme 9691_w15_ms_22.pdf →

Show text version of question

Question 1

Part (e)

Part (e)

Sheena has entered some more book data.

Write pseudocode to save the array records to the serial file BookData.DAT

Only those array elements containing book data should be saved to the file.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[5]

Topic relevance

Why this question appears here

72% assigned-topic match · Hardware › Logic gates and logic circuits

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 9691_w15_qp_22.pdf

Keep practising this topic