Note AcademyNote Academy

Computer Science (AS & A Level) · May / June 2025 · Paper 32 · Question 13

9618

As printed in the paper

The question as text

The pseudocode algorithm below uses random file access to copy 50 records from a live file CurrentResults.dat to a stored file StoredResults.dat one record at a time. It uses the user-defined type StudentResult. TYPE StudentResult DECLARE LastName : STRING DECLARE FirstName : STRING DECLARE ExamGrade : STRING ENDTYPE If any grades are missing in CurrentResults.dat, the text "Missing grade" is added to the ExamGrade field in StoredResults.dat Complete this file handling pseudocode algorithm. DECLARE Grade : StudentResult DECLARE Position : INTEGER OPENFILE "StoredResults.dat" FOR RANDOM SEEK "CurrentResults.dat", Position GETRECORD "CurrentResults.dat", Grade IF Grade.ExamGrade = "" THEN ENDIF NEXT Position CLOSEFILE "CurrentResults.dat" CLOSEFILE "StoredResults.dat" [5]

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.