Lesson 4.1.1.1
4.1.1.1 Data types Quiz: AQA Computer Science, Unit 1
20 questions
In partnership with Revision Ninja
Lesson 4.1.1.1, Data types: 20 multiple choice questions for the AQA Computer Science (7517), Unit 1: Fundamentals of programming, written with Revision Ninja.
Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.
The 20 questions
-
Which data type should a pointer or reference variable be classed as when it stores the memory address of an object created at runtime?
- A pointer/reference data type
- A real/float data type, used for values that include a fractional part
- A character data type, used to hold one symbol from the character set
- A Boolean data type, used to hold only TRUE or FALSE values
-
Which built-in data type is most suitable for storing whether a customer has paid an invoice, using only the values TRUE or FALSE?
- Boolean
- String
- Real/float
- Integer
-
Which built-in data type is needed to store a value such as 3.75 that has a fractional part?
- Real/float
- Boolean
- Character
- Integer
-
What is a record in a programming language?
- A collection of elements that all share one data type
- A collection of fields that may have different data types
- A single character code stored as a number
- A fixed numeric constant that cannot change
-
Which of these is a user-defined data type?
- The integer type built into the language for whole numbers
- A record type defined by the programmer from built-in types
- The string type built into the language for sequences of characters
- The Boolean type built into the language for TRUE or FALSE values
-
Which data type is used to store a single symbol such as the letter Q?
- Character
- Pointer/reference
- Record
- Date/time
-
Which data type holds an indexed collection of elements that all have the same data type?
- Pointer/reference
- Array (or equivalent)
- Date/time
- Record (or equivalent)
-
A program stores a student's date of birth. Which built-in data type is most suitable?
- Integer
- Character
- Date/time
- Real/float
-
Which statement about a Boolean variable is correct?
- It can hold only the values TRUE or FALSE
- It can hold any whole number
- It can hold a memory address
- It can hold any sequence of characters
-
A programmer defines a type Point with two real fields x and y. What is Point classed as?
- A language-defined character type
- A pointer/reference type
- An integer type
- A user-defined data type
-
Which of these is an integer literal?
- "42"
- 42.0
- 42
- TRUE
-
A variable holds the address of a Node object that was created with a runtime allocation. Which data type is most accurate for that variable?
- Array, used to store an indexed set of same-type elements
- Record, used to group fields of different types together
- Integer, used to store a whole number value in memory
- Pointer/reference
-
Which type is most suitable for storing a postcode such as AB1 2CD, which mixes letters and digits and is never used in arithmetic?
- Real/float
- Boolean
- String
- Integer
-
A price of 19.99 pounds must be used in multiplication with a quantity. Which data type should store it?
- Real/float
- Character
- Pointer/reference
- Boolean
-
An array of 10 records is stored, and each record has 3 fields that each hold one value. How many individual data items are stored in total?
- 30
- 10
- 13
- 3
-
Why might a real/float type be needed rather than an integer type for a value such as 0.1?
- Integers cannot be stored in a variable
- Floats cannot be used in comparisons
- Integers cannot represent fractional values
- Floats always use fewer bytes than integers
-
Variable p holds the address of an integer object whose value is 7. The program increments the value at that address by 1 through p. What is the stored value afterwards?
- 1000
- 7
- 6
- 8
-
Why would a programmer define a user-defined data type?
- To group related fields under one meaningful name for reuse
- To store every value as text
- To avoid declaring variables altogether
- To make the program run faster by removing type checking
-
A date is stored as the string "2024-03-15". Why should it be converted to a date/time value before dates are compared?
- Because date/time values use less memory than strings
- Because strings cannot be stored in variables
- So that comparison follows calendar order rather than text order
- Because string comparison is always incorrect for any text
-
Which data type should store a customer's name, such as Sarah Jones, so that it can be joined with other text?
- Boolean
- Real/float
- Pointer/reference
- String
Related quizzes
- Programming concepts: sequence, selection and iteration Quiz · 4.1.1.2 · 20 questions
- Arithmetic operations Quiz · 4.1.1.3 · 20 questions
- Relational and Boolean operations Quiz · 4.1.1.4 · 20 questions
- Constants and variables Quiz · 4.1.1.6 · 20 questions
- String-handling operations Quiz · 4.1.1.7 · 20 questions
- Random numbers and exception handling Quiz · 4.1.1.8 · 20 questions
- Subroutines Quiz · 4.1.1.10 · 20 questions
- Parameters and returning values Quiz · 4.1.1.11 · 20 questions
- Local and global variables Quiz · 4.1.1.13 · 20 questions
- Stack frames in subroutine calls Quiz · 4.1.1.15 · 20 questions