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.
The 20 questions
-
Which string-handling operation returns the number of characters in a string?
- length
- substring
- position
- concatenation
-
Which string operation joins two separate strings end to end to form one string?
- Substring
- Concatenation
- Position
- Length
-
Which operation returns part of a string, starting at a given position and of a given length?
- Length
- Character code
- Concatenation
- Substring
-
What integer value is returned by converting the uppercase ASCII character A to its character code?
- 66
- 97
- 65
- 48
-
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
-
Which conversion turns the string "42" into the integer 42?
- String to float
- Date/time to string
- Integer to string
- String to integer
-
Which operation returns the position of a character or substring within a string?
- Float
- Length
- Concatenation
- Position
-
What is the length of the string "Quiz Rush" including the space?
- 8
- 7
- 9
- 10
-
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
-
What string function is used to convert the text hello into uppercase characters?
- ToUpper
- StrLength
- SubString
- ToLower
-
Which conversion turns the integer 250 into the string "250"?
- String to float
- String to integer
- String to date/time
- Integer to string
-
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
-
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
-
What occurs when attempting a string to integer conversion on the text string 12A?
- Conversion to 0
- Truncation to 12
- Runtime error
- Automatic rounding
-
Which code is returned by the character-code operation for the character a if the character set is ASCII?
- 65
- 98
- 97
- 1
-
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
-
Which string operation extracts a portion of a string based on a start index and length?
- Substring
- Length
- Position
- Concatenation
-
Why must user input containing numbers be converted before performing mathematical addition?
- Enforces variable scoping
- Prevents memory overflow
- Text prevents arithmetic
- Reduces CPU cycles
-
Which string operation returns the index location of a specific character within a string?
- Position
- Concatenation
- Substring
- Length
-
The string "ABCDE" is processed by substring(3, 2). What is returned?
- ABC
- DE
- BC
- CD
Related quizzes
- Data types Quiz · 4.1.1.1 · 20 questions
- 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
- 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