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.

Host this setFree Play

The 20 questions

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. Which data type is used to store a single symbol such as the letter Q?

    • Character
    • Pointer/reference
    • Record
    • Date/time
  7. 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)
  8. A program stores a student's date of birth. Which built-in data type is most suitable?

    • Integer
    • Character
    • Date/time
    • Real/float
  9. 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
  10. 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
  11. Which of these is an integer literal?

    • "42"
    • 42.0
    • 42
    • TRUE
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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

All AQA Computer Science quizzes