Question 8(d) 2022 · October-November · Paper 21 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 8
Part (d)
Question 2
Show text version of question
Question 8
Part (d)
Question 8
A teacher is designing a program to perform simple syntax checks on programs written by
students. Student programs are submitted as text files, which are known as project files.
The teacher has defined the first program module as follows:
Module Description
- takes the name of an existing project file as a parameter of type
- returns TRUE if the file is valid (it contains at least 10 non-blank
string CheckFile()
lines), otherwise returns FALSE
Part (d)
Module CheckLine() includes a check for syntax errors.
Two examples of syntax error that cannot be detected from examining a single line are those involving selection and iteration.
Give two other examples.
1 ................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Question 18
Question 19
Question 20
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cambridgeinternational.org after the live examination series.
Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.
Why this question appears here
99% assigned-topic match · Programming › Constructs
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_w22_qp_21.pdf
