Pearson Edexcel GCSE (9-1) · Computer Science (1CP2)

Data types and structures: Practice Questions

5 multiple-choice questions marked as you go, and 5 written questions with worked solutions. All on Data types and structures.

10 questions24 marksFree, no account
Question 1
1 mark

Which of these is a primitive data type used to store a single keyboard character such as 'A' or '?'?

Question 2
1 mark

What would be the result of a substring operation on the string "ComputerScience" if the parameters were substring(4, 3) (using 0-based indexing where 4 is the start index and 3 is the length)?

Question 3
1 mark

A programmer needs to store data about a book, including its Title (String), Price (Real), and IsAvailable (Boolean). Which data structure allows these different data types to be stored together as a single entity?

Question 4
1 mark

Which of the following is considered a primitive data type used in programming?

Question 5
1 mark

A programmer needs to store a collection of 50 student names. Which data structure is most appropriate for storing this data under a single identifier?

Question 6
2 marks

State the most appropriate primitive data type for storing whether a user has agreed to the terms and conditions of a website.

Write your answer out first, then check it against the worked solution.

Question 7
3 marks

A program needs to store the names of 30 students in a class. Identify the most efficient data structure to use and state its dimension.

Write your answer out first, then check it against the worked solution.

Question 8
6 marks

Given a string variable \( S = "Edexcel" \), determine the result of a substring operation that extracts 4 characters starting from index 2.

Write your answer out first, then check it against the worked solution.

Question 9
3 marks

A programmer is writing a script to calculate the area of a circle. The user needs to provide the radius as a decimal number.

(a) Identify the most appropriate data type for the variable radius.
(b) Write a line of code that takes a user's input and stores it as this data type.

Write your answer out first, then check it against the worked solution.

Question 10
5 marks

An array named scores contains the following values: [45, 67, 12, 89, 34].

(a) State the 0-based index of the value 12.
(b) Write a pseudocode loop that iterates through every item in this array and outputs only scores greater than 50.
(c) Identify the data structure used for scores and state if it is static or dynamic in typical implementation.

Write your answer out first, then check it against the worked solution.

* The content provided by thinka is generated by AI and may not always be accurate or up-to-date. Please use it as a supplementary resource and verify with official materials.

You've seen the model answer. Now get yours marked.

This page can show you how a good answer looks. It cannot tell you what your answer was missing. thinka marks your written work against the real mark scheme in about 15 seconds.

Want more questions like these? Get a fresh set on this topic, marked as you go.

Practise More