Data Types and Structures: past paper questions
Real questions on data types and structures
The newest 20 of 211 written questions. Open one to see it on the real paper.
- 9618/21 · October/November 2025 · Q1a[4]
The program contains these variables: Data type MyChar CHAR MyString STRING MyInt INTEGER MyDOB DATE Variable Complete the table by filling in the gaps using functions and/or operators from the insert. Each expression must be valid. Expression MyString MyChar MyString MyInt 'X' MyString ("ABCD", , ) ( (MyDOB)) ( (MyStr...
See it on the paper → - 9618/21 · October/November 2025 · Q3a(i)[4]
Write pseudocode to declare the record structure for type RentalRecord
See it on the paper → - 9618/21 · October/November 2025 · Q3a(ii)[2]
A 1D array Rental containing 500 elements is used to store the data for all rental records. Write pseudocode to declare the Rental array.
See it on the paper → - 9618/21 · October/November 2025 · Q3b[3]
State three benefits of using an array of records to store the data for all rentals.
See it on the paper → - 9618/22 · October/November 2025 · Q1b[3]
Complete the table by giving the appropriate data type. Variable Example data value Result 5.42 MonthLetter "JFMAMJJASOND" Birthday 15/11/2009 Data type
See it on the paper → - 9618/22 · October/November 2025 · Q1c[4]
Evaluate each expression in the table by using the data values shown in (b). Write ‘ERROR’ if the expression contains an error. Expression Evaluates to INT(Result) + 1 > 6 NUM_TO_STR(LENGTH(MonthLetter)) MID(MonthLetter, MONTH(Birthday) — 2, 1) NUM_TO_STR(Result + "3.2")
See it on the paper → - 9618/22 · October/November 2025 · Q2[5]
Data is a global 1D array containing 20 elements of type REAL An algorithm will: • • • input a sequence of real values, one at a time assign each value to consecutive array elements, starting from index 1 end when the value 99.9 is input, or all 20 elements have been assigned (the value 99.9 must not be stored in the a...
See it on the paper → - 9618/22 · October/November 2025 · Q8a[7]
Write pseudocode for module CountLoans()
See it on the paper → - 9618/22 · October/November 2025 · Q8b[7]
As a reminder, a global array Loan stores 7000 loan records with data items for each loan record: Data item Data type Comment StudentID STRING the unique ID of the student who has borrowed the book BookID STRING the unique ID of the book being borrowed OnLoan BOOLEAN TRUE if the book has not been returned A new module...
See it on the paper → - 9618/23 · October/November 2025 · Q1c[1]
Variables in the program have example values: Variable Example value DoB 23/6/2011 Multiplier 2.5 AddressLine "35 Lincoln Avenue" Complete the table by evaluating each expression using the example values: Expression Evaluates to LENGTH(NUM_TO_STR(Multiplier)) MONTH(DoB) > 4 15 + STR_TO_NUM(MID(AddressLine , 2, 1))
See it on the paper → - 9618/23 · October/November 2025 · Q4[4]
A program contains a global 1D array Data containing 20 elements of type INTEGER A global string NumString represents a sequence of three-digit numbers, separated by commas. For example: "101,456,219,754,328" The string contains at least four three-digit numbers. The total number of three-digit numbers in the string is...
See it on the paper → - 9618/23 · October/November 2025 · Q8a[8]
Write efficient pseudocode for the module LoanStatus() Assume that each combination of StudentID and BookID can occur only once.
See it on the paper → - 9618/23 · October/November 2025 · Q8b[7]
A second module is defined: Module LoansPerTutor() Description • called with a parameter of type STRING representing a tutor ID (as a reminder, the first three characters of a StudentID represent a tutor ID) • returns an integer value representing the number of books currently on loan to students who have the given tut...
See it on the paper → - 9618/31 · October/November 2025 · Q1a(i)[1]
Write the pseudocode statement to set up a variable for one record of the composite data type, ClubMember.
See it on the paper → - 9618/31 · October/November 2025 · Q1a(ii)[2]
Write the pseudocode statements to assign the following values to the variable set up in part (a)(i): • • 984632 to Code TRUE to FeesPaid
See it on the paper → - 9618/31 · October/November 2025 · Q1b(i)[2]
Write the pseudocode statement for the type declaration of Activity to hold the names of the available activities: Badminton, Football, Golf, Snooker, Swimming, Tennis.
See it on the paper → - 9618/31 · October/November 2025 · Q8b[2]
Write the Reverse Polish Notation (RPN) for the given infix expression: (2 – 6) * (13 + 7) / 5
See it on the paper → - 9618/32 · October/November 2025 · Q12a(i)[4]
Complete the pseudocode for the procedure to add a data item onto the stack. PROCEDURE Push( ) IF Top < Max – 1 THEN ← NewData ELSE OUTPUT ENDIF Top ←
See it on the paper → - 9618/33 · October/November 2025 · Q10a[3]
Write pseudocode to declare the variables, constant and array required to implement the stack.
See it on the paper → - 9618/33 · October/November 2025 · Q10b[3]
Write pseudocode for a procedure to initialise the top and bottom pointers of the stack to appropriate values.
See it on the paper →
What examiners said
This question was generally not answered well. Imprecise statements such as ‘DRAM is cheaper’ or ‘DRAM can store more data’ are not enough for credit. DRAM has a lower cost per unit and a higher bit density is more precise.
— Examiner report, October/November 2023, 9618/11 Q7(c) (Cambridge)
A common error was for the delimiter speech marks to be omitted from row 1 and row 3. Some answers for row 2 were shown as 12/3 which did not gain credit. Another frequent error on row 4 was to state the answer as 10. A general point candidates should be aware that a statement such as ‘30 to 40’ does include the two boundary values.
— Examiner report, October/November 2023, 9618/21 Q1(a) (Cambridge)
Well answered with the major of candidates gaining all full three marks. Candidates should be reminded that if an answer such as ‘integer/real’ is presented only the first answer shown will be marked.
— Examiner report, October/November 2023, 9618/21 Q1(d) (Cambridge)
Past papers, syllabus and examiner reports © UCLES (Cambridge University Press & Assessment). Questions are matched to topics from the official syllabus. AssessPro is independent and not endorsed by Cambridge.