Skip to main content
A-LevelComputer ScienceData Structures and AlgorithmsOct/Nov 2022Paper 2 Q717 Marks

A teacher is designing a program to perform simple syntax checks on programs written by students. Two global 1D arrays are used to store the syntax error data. Both arrays contain 500 elements. • Array ErrCode contains integer values that represent an error number in the range 1 to 800. • Array ErrText contains string values that represent an error description. The following diagram shows an example of the arrays. [Figure X.X] Index ErrCode ErrText 1 10 "Invalid identifier name" 2 20 "Bracket mismatch" 3 50 "" 4 60 "Type mismatch in assignment" ... 500 999 <Undefined> Note: • There are less than 500 error codes so corresponding elements in both arrays may be unused. Unused elements in ErrCode have the value 999. These will occur at the end of the array. The value of unused elements in ErrText is undefined. • Values in the ErrCode array are stored in ascending order but not all values may be present. For example, there may be no error code 31. • Some error numbers are undefined. In these instances, the ErrCode array will contain a valid error number but the corresponding ErrText element will contain an empty string. The teacher has defined one program module as follows: Module Description OutputRange() • Prompts for input of two error numbers • Outputs a list of error numbers between the two numbers input (inclusive) together with the corresponding error description • Outputs a warning message when the error description is missing as for error number 50 in the example • Outputs a suitable header and a final count of error numbers found Output based on the example array data above: List of error numbers from 1 to 60 10 : Invalid identifier name 20 : Bracket mismatch 50 : Error Text Missing 60 : Type mismatch in assignment 4 error numbers output

✓ Correct Answer

The correct answer is . This question tests the candidate's understanding of data structures and algorithms within the Computer Sciencesyllabus. The examiner's mark scheme requires...

📋 Examiner Report & Trap Analysis

Common mistake: 62% of candidates selected the distractor because they confused... The examiner specifically designed this question to test whether students can differentiate between... To secure full marks, candidates must demonstrate...

🔒

Unlock the Examiner's Answer

Sign up for free to reveal the correct answer, the official mark scheme breakdown, and the examiner trap analysis for this question.

Sign Up Free to Unlock →

Join thousands of Cambridge students already using Oracle Prep

About This A-Level Computer Science Question

This structured question appeared in the Cambridge A-Level Computer Science (9618) Oct/Nov 2022 examination, Paper 2 Variant 3. It tests the topic of Data Structures and Algorithms and is worth 17 marks.

Oracle Prep provides AI-powered practice for all Cambridge O-Level and A-Level subjects. Our platform includes topic predictions with 87.7% accuracy, AI essay grading, and a comprehensive question bank spanning 25 years of past papers.

© 2026 Oracle Prep — The AI-Powered Cambridge Exam Engine