Lesson 4.1.1.7

4.1.1.7 String-handling operations Quiz: AQA Computer Science, Unit 1

20 questions

In partnership with Revision Ninja

Lesson 4.1.1.7, String-handling operations: 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 string-handling operation returns the number of characters in a string?

    • length
    • substring
    • position
    • concatenation
  2. Which string operation joins two separate strings end to end to form one string?

    • Substring
    • Concatenation
    • Position
    • Length
  3. Which operation returns part of a string, starting at a given position and of a given length?

    • Length
    • Character code
    • Concatenation
    • Substring
  4. What integer value is returned by converting the uppercase ASCII character A to its character code?

    • 66
    • 97
    • 65
    • 48
  5. Which operation converts a numeric code such as 66 back into its corresponding character?

    • Character to code
    • Substring extraction
    • Code to character
    • String to integer
  6. Which conversion turns the string "42" into the integer 42?

    • String to float
    • Date/time to string
    • Integer to string
    • String to integer
  7. Which operation returns the position of a character or substring within a string?

    • Float
    • Length
    • Concatenation
    • Position
  8. What is the length of the string "Quiz Rush" including the space?

    • 8
    • 7
    • 9
    • 10
  9. Given the string "computer", what does substring(1, 4) return when the first character is at position 1 and the length is 4?

    • ompu
    • uter
    • comp
    • compu
  10. What string function is used to convert the text hello into uppercase characters?

    • ToUpper
    • StrLength
    • SubString
    • ToLower
  11. Which conversion turns the integer 250 into the string "250"?

    • String to float
    • String to integer
    • String to date/time
    • Integer to string
  12. Which operation converts the text string 3.5 into a real floating-point number?

    • String to integer
    • Float to string
    • Character to float
    • String to float
  13. Which conversion produces the text 2024-03-15 from a date value?

    • Date/time to string
    • Integer to string
    • String to date/time
    • Float to string
  14. What occurs when attempting a string to integer conversion on the text string 12A?

    • Conversion to 0
    • Truncation to 12
    • Runtime error
    • Automatic rounding
  15. Which code is returned by the character-code operation for the character a if the character set is ASCII?

    • 65
    • 98
    • 97
    • 1
  16. A program uses substring to extract the first 3 characters of a product code "AB1234" and then concatenates "XY" to the result. What is the new string?

    • AB1XY
    • ABXY1
    • XYAB1
    • ABXY
  17. Which string operation extracts a portion of a string based on a start index and length?

    • Substring
    • Length
    • Position
    • Concatenation
  18. Why must user input containing numbers be converted before performing mathematical addition?

    • Enforces variable scoping
    • Prevents memory overflow
    • Text prevents arithmetic
    • Reduces CPU cycles
  19. Which string operation returns the index location of a specific character within a string?

    • Position
    • Concatenation
    • Substring
    • Length
  20. The string "ABCDE" is processed by substring(3, 2). What is returned?

    • ABC
    • DE
    • BC
    • CD

All AQA Computer Science quizzes