A Level Computer Science 9618, topic 20.2

File Processing and Exception Handling: past paper questions

31 Cambridge A Level Computer Science 9618 questions on File Processing and Exception Handling (20.2) from 31 papers, 2023 to 2026. Open the paper or try a question free.

Practising builds a set from this topic, free with an account. One question opens straight away, with no account.

Questions
31
Papers
31
Years
2023 to 2026
Total marks
592
Average per question
19.1 marks
Largest question
33 marks

By type: Structured 31

How hard the questions are

  • Recall10
  • Apply17
  • Analyse4
  • Not banded0

Derived from the command word Cambridge prints in each question, banded by a fixed table beside the syllabus's own definitions. A question printing no command word is unbanded: unknown, not middling.

Command words

  • writeRecall20 questions

    write an answer in a specific way

  • useApply9 questions
  • completeApply8 questions

    add information to an incomplete diagram or table

  • nameRecall8 questions
  • calculateApply3 questions

    work out from given facts, figures or information

  • identifyRecall3 questions

    name/select/recognise

  • compareAnalyse2 questions

    identify/comment on similarities and/or differences

  • defineRecall2 questions

    give precise meaning

  • describeApply2 questions

    state the points of a topic / give characteristics and main features

  • explainAnalyse2 questions

    set out purposes or reasons / make the relationships between things clear / say why and/or how and support with relevant evidence

Where the questions come from

By year

  • 20263
  • 202512
  • 20245
  • 202311

By session

  • May/June16
  • Oct/Nov15

By paper

  • Paper 311
  • Paper 420

Questions on this topic

Showing 26 of 31, spread across the years. Open one to write your answer and have it marked.

  • Question 2May/June 2026, paper 41Structured28 marks

    A program stores data about toys that are made from bricks.

    Try this question
  • Question 10Oct/Nov 2025, paper 31Structured3 marks

    Explain what is meant by exception handling.

    Try this question
  • Question 1Oct/Nov 2024, paper 41Structured22 marks

    A program sorts string data using different sorting methods. The text file Data.txt stores string data items. Each data item is on a new line in the text file.

    Try this question
  • Question 8Oct/Nov 2023, paper 31Structured8 marks

    A pseudocode algorithm finds a customer account record in a random file and outputs it. The records are stored using the user-defined data type TAccount.

    Try this question
  • Question 2May/June 2026, paper 42Structured30 marks

    A program stores data about avatars in a program using Object-Oriented Programming (OOP). An avatar is a character that a user can control in a game. The class Avatar stores the data about avatars.

    Try this question
  • Question 10Oct/Nov 2025, paper 32Structured4 marks

    An exception is an error that may cause a program to halt unexpectedly. Describe how program termination due to an exception can be avoided.

    Try this question
  • Question 3Oct/Nov 2024, paper 42Structured17 marks

    The text file HighScoreTable.txt stores the top seven player scores for a game. The data in the file is stored in the order: Player ID Game level Score Each item of data is stored on a new line.

    Try this question
  • Question 12Oct/Nov 2023, paper 32Structured9 marks

    Describe, with an example, what is meant by an exception.

    Try this question
  • Question 2May/June 2026, paper 43Structured29 marks

    A prototype for a game is being developed using Object-Oriented Programming (OOP). The game has a set of characters that have data stored about their characteristics, for example if the character can fly or not fly.

    Try this question
  • Question 12Oct/Nov 2025, paper 33Structured5 marks

    An exception can occur when running a program. Explain what is meant by an exception.

    Try this question
  • Question 3Oct/Nov 2025, paper 41Structured25 marks

    A program stores records in the 2D array HashTable. Each record is stored at a specific index of the array that is calculated using a hashing algorithm with the record’s key field. The array has 100 × 10 elements.

    Try this question
  • Question 2May/June 2024, paper 41Structured31 marks

    A computer program will store data about trees. The user can enter their requirements for a tree and a suitable tree will be selected. The program is written using object-oriented programming.

    Try this question
  • Question 2Oct/Nov 2023, paper 41Structured29 marks

    A linear queue is implemented using the 1D array, Queue. The index of the first element in the array is 0.

    Try this question
  • Question 3Oct/Nov 2025, paper 42Structured21 marks

    A program stores integers in ascending order in an ordered binary tree. The tree is implemented as a 2D array. Each node is stored with three values: • a pointer to the left node • the data • a pointer to the right node.

    Try this question
  • Question 1Oct/Nov 2023, paper 42Structured27 marks

    A program stores lower-case letters in two stacks. One stack stores vowels (a, e, i, o, u) and one stack stores consonants (letters that are not vowels). Each stack is implemented as a 1D array.

    Try this question
  • Question 2Oct/Nov 2025, paper 43Structured24 marks

    A program reads string data from a text file into a linear queue and then compresses the data. The queue is created using the global 1D array Queue. The queue can store up to 100 elements.

    Try this question
  • Question 12May/June 2025, paper 31Structured5 marks

    The pseudocode algorithm checks whether a location in a stock file StockList.dat is empty or not. The location is given by the user. If the location is empty, a suitable message is displayed, otherwise the item stored at that location is displayed.

    Try this question
  • Question 10May/June 2023, paper 31Structured5 marks

    The pseudocode algorithm shown copies an active accounts text file ActiveFile.txt to an archive accounts text file ArchiveFile.txt, one line at a time.

    Try this question
  • Question 13May/June 2025, paper 32Structured5 marks

    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.

    Try this question
  • Question 6May/June 2023, paper 32Structured9 marks

    Write pseudocode statements to declare the composite data type, TAppointments, to hold data about patients for a dental clinic.

    Try this question
  • Question 11May/June 2025, paper 33Structured5 marks

    The pseudocode algorithm below allows a user to input a new stock item. The random file is searched for the next empty location in the file and the new item is inserted there. A suitable message is displayed if the file is full.

    Try this question
  • Question 3May/June 2023, paper 41Structured25 marks

    A program implements two stacks using 1D arrays. One stack stores the names of colours. One stack stores the names of animals.

    Try this question
  • Question 2May/June 2025, paper 41Structured25 marks

    A program reads data from a text file, splits the data depending on its content and stores the separated data into different files. The text file TheData.txt contains 72 lines of data. Each line of data has an integer number and a string colour that are separated by a comma.

    Try this question
  • Question 3May/June 2023, paper 42Structured33 marks

    A company needs a computer program to store data about its employees. Part of the program is being written using object‑oriented programming. The class Employee stores data about the employees.

    Try this question
  • Question 1May/June 2025, paper 42Structured27 marks

    A program reads data from a text file and stores it in a stack. The stack Stack is stored as a 1D array of up to 20 elements. The pointer TopOfStack stores the index of the last element stored in the stack.

    Try this question
  • Question 1May/June 2025, paper 43Structured26 marks

    A program reads data from a text file and stores it in a queue. The linear queue Queue is stored as a 1D array of up to 50 elements.

    Try this question