Tayyari Karo Open the app

A Level Computer Science: Programming and object-oriented programming, questions with answers

Practise 397 real questions on Programming and object-oriented programming from 2021 to 2026. See the answer and explanation as soon as you answer.

397real questions
4papers covered
11exam sessions

About Programming and object-oriented programming in A Level Computer Science

Programming and object-oriented programming is one of the 10 main topics in our A Level Computer Science (Cambridge (CAIE) 9618) question bank, and about 35% of its real questions come from it. Tayyari Karo has 397 real questions on this topic from 2021 to 2026, from Paper 1, Paper 2, Paper 3, Paper 4. By difficulty: 170 easy, 135 medium, 92 hard.

Work through the questions below, then open the explanation for each one. Redo the ones you missed a few days later.

Try 8 real questions

These are real past-paper questions. Think of your answer first, then open the explanation.

May/June 2026 · Paper 2 · Programming and object-oriented programming

Study this pseudocode: FOR i <- 3 TO 12 STEP 3 / OUTPUT i, i * i / NEXT i. (a) Identify the type of construct used in this pseudocode. [1]

Show model answer

Count-controlled loop // count-controlled iteration

A FOR loop repeats a fixed number of times.

May/June 2025 · Paper 4 · Programming and object-oriented programming

(e)(i) Write program code for the main program which calls ReadData() and then SplitData().

Show model answer

DataFromFile = ReadData();
SplitData(DataFromFile);

3 marks: 1 for calling ReadData, 1 for storing/using return value, 1 for calling SplitData with returned array.

May/June 2024 · Paper 3 · Programming and object-oriented programming

(a) Explain what is meant by non-composite and composite data types.

Show model answer

Non-composite:
• Non-composite data types can be user-defined or primitive
• Do not refer to other data types in their definition / contain one data type
• Can be primitive/enumerated/pointer
Composite:
• Composite data types can be user-defined or primitive
• Refer to other data types in their definition / contain more than one data type
• Can be record/set/class

3 marks: up to 2 for non-composite, up to 2 for composite (max 3).

October/November 2024 · Paper 2 · Programming and object-oriented programming

(d) The final CASE condition (> 200) in the pseudocode example could be replaced with a keyword. Give the keyword.

Show model answer

OTHERWISE

1 mark.

May/June 2023 · Paper 3 · Programming and object-oriented programming

(a) Describe what is meant by recursion.

Show model answer

• A process using a function or procedure defined in terms of itself / calls itself
• A recursive process must have a base case (which is a way to return without making a recursive call) / terminating solution / concept of unwinding
• There must (also) be a general case where the recursive call takes place

2 marks: 1 each to max 2.

October/November 2023 · Paper 2 · Programming and object-oriented programming

(c)(ii) Explain how the message format could be changed to allow a blank line to be sent.

Show model answer

• Append a (special) character to the start of the message text and interpret the new field data as a blank line
• Or: Change the message protocol and use an additional field to act as an indicator and interpret the new field data

2 marks: 1 for each point.

October/November 2022 · Paper 2 · Programming and object-oriented programming

(d) Identify two types of errors that CheckLine() might detect in a student's program.

Show model answer

• Incorrect block structure. Missing keyword denoting part of block (for example ENDPROCEDURE, ENDFUNCTION, ENDTYPE)
• Data type errors, for example assigning an integer value to a string
• Identifier used before it is declared
• Incorrect parameter use

2 marks: 1 for each to max 2.

May/June 2021 · Paper 3 · Programming and object-oriented programming

(b)(i) Define, using pseudocode, the enumerated data type SchoolDay to hold data about the days students are usually in school.

Show model answer

TYPE SchoolDay = (Monday, Tuesday, Wednesday, Thursday, Friday)

1 mark.

Sessions with Programming and object-oriented programming questions

SessionPaper 1Paper 2Paper 3Paper 4
May/June 2026–15619
May/June 2025–8722
October/November 2025–6217
May/June 2024–8725
October/November 2024115718
May/June 2023–8526
October/November 2023–14820
May/June 2022–10623
October/November 2022–12215
May/June 2021–14719
October/November 2021–3814

Common questions

What does the Programming and object-oriented programming topic cover on this page?

397 real A Level Computer Science (9618) questions on Programming and object-oriented programming from 2021 to 2026, from Paper 1, Paper 2, Paper 3, Paper 4. Each one shows the year, session and paper it came from.

Do I get the answers and explanations?

Yes. Every question shows the correct answer and a short explanation the moment you answer.

Is it free?

You can start free with no signup. A small set of papers per subject is free, and Premium unlocks every paper, the full question bank and the paper PDFs.

Other Computer Science topics

All A Level Computer Science questions

Computer Science at other levels

Ready to start?

Free to start. No signup needed to try the questions.

Open Tayyari Karo