Past-paper question · 2015 October-November · Paper 21 · Q1(d)(ii)

Question 1(d)(ii) 2015 · October-November · Paper 21 · 6 marks

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

Official answer for Question 1

Part (d)

(ii)

(ii)

Mark as follows:

  • Open file CourseData.DAT
  • … for reading/input
✓
–
✓
loop while not end of file CourseData.DAT
✓
–
✓
read record from file
✓
–
✓
assign to array element
✓
–
✓
correctly initialised and incremented index
✓
–
✓
Close file CourseData.DAT
✓
Example pseudocode:
✓
OPENFILE CourseData.DAT for READING // for INPUT
✓
i ← 1
✓
WHILE NOT EOF(CourseData.DAT)
✓
READ record FROM FILE
✓
Course[i] ← record
✓
i ← i + 1
✓
ENDWHILE
✓
CLOSEFILE CourseData.DAT
✓
[max 6]
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge International AS/A Level – October/November 2015
✓
9691

Question 21

Mark scheme 9691_w15_ms_21.pdf →

Show text version of question

Question 1

Part (d)

(ii)

Ravi has entered some course data. His program saved the array records to a serial file CourseData.DAT. Only those array elements containing entered course details were saved to the file.

A
program is to be written to read the data from CourseData.DAT into consecutive locations

of the array Course.

(ii)

Write pseudocode to read the data from the file CourseData.DAT into the array

Course.

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

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

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

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

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

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

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

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

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

.......................................................................................................................................[6]

Question 5

Topic relevance

Why this question appears here

82% assigned-topic match · Data types and structures › Files

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_21.pdf

Keep practising this topic