Computer Science · May / June 2024 · Paper 21 · Question 7
0478
As printed in the paper
Show the answer and mark scheme
7(a)[2]
One mark per mark point, max two
Data stored in a file gives a permanent copy / prevents the data from being lost… so it can be recalled / used again in a program / in another programcan be stored elsewhere / transferred to another computer7(b)[4]
One mark per mark point, max four
MP1
Declaration of a string variable
MP2
Correct use of OPENFILE keywords for reading
MP3
Correct use READFILE with string variable
MP4
Correct use of UCASE and LENGTH functions and output of each
MP5
Correct use of CLOSEFILE
Example:
DECLARE Words : STRING
OPENFILE Quotation.txt FOR READ
READFILE Quotation.txt, Words
OUTPUT UCASE(Words), LENGTH(Words)
CLOSEFILE Quotation.txt
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

