Data types and casting: OCR GCSE Computer Science questions
Every OCR GCSE Computer Science exam question on 2.2.2 Data types and casting, 2022–2025, with its mark scheme and examiner’s report.
Paper
All papers
Exam
All years
Calculations
Q4(b)
The whole paper ↗Q6(b)(iii)
The whole paper ↗Q9(a)(i)
The whole paper ↗Q6(a)
The whole paper ↗Q6(c)(iii)
The whole paper ↗Q6(f)(i)
The whole paper ↗Q2(d)(i)
The whole paper ↗Q5(a)(i)
The whole paper ↗Q5(a)(ii)
The whole paper ↗Q8(a)
The whole paper ↗
All 10 questions on Data types and casting, as a list
- June 2025, Paper 2, Q4(b) (1 mark): Identify how casting is used in this algorithm. [1]
- June 2025, Paper 2, Q6(b)(iii) (2 marks): Give the most appropriate data type for each field shown. Field name Data stored Data type Stage The name of the stage SetLength The length of each set in hours
- June 2024, Paper 2, Q9(a)(i) (3 marks): Identify the most appropriate data type for each variable used by the program. Each data type must be different. Variable Example Data type teamName "Super-Team
- June 2023, Paper 2, Q6(a) (4 marks): Below is a table showing some variables within the program. Tick (3) one box in each row to identify the most appropriate data type for each variable. Variable
- June 2023, Paper 2, Q6(c)(iii) (1 mark): Identify the data type of the data returned by the function CheckSensorCode() [1]
- June 2023, Paper 2, Q6(f)(i) (1 mark): An array can only store data of one data type. Any non-string data must be converted to a string before storing in the array. Identify the process that converts
- June 2022, Paper 2, Q2(d)(i) (2 marks): Define the term casting and give the line number where casting has been used in the algorithm. Definition Line number [2]
- June 2022, Paper 2, Q5(a)(i) (2 marks): State the most appropriate data type for the following fields: Nights Room [2]
- June 2022, Paper 2, Q5(a)(ii) (1 mark): Give the name of one field that could be stored as a Boolean data type. [1]
- Specimen, Paper 2, Q8(a) (2 marks): Tick (✓) one box to identify the data type you would choose to store the data and explain why this is a suitable data type. Data Type Tick (✓) one box String In
Questions, mark schemes and examiner’s reports are © OCR, from their published past papers. Plumi isn’t affiliated with any exam board. Want whole papers? Full past papers.
Rather write your answers by hand on iPad? Plumi marks them against the same mark schemes.