AP Computer Science Principles Quiz
19 questions · no time limit
0:00
ALGORITHMS AND PROGRAMMING
Question 1 of 19
No time limit
Current
Answered
Flagged
Not seen
Consider the following code segment. The procedure
LENGTH(str) returns the number of characters in the string str.
`word ← "racecar"
len ← LENGTH(word)
firstHalf ← SUBSTRING(word, 1, 3)
secondHalf ← SUBSTRING(word, 5, 3)`
Which of the following expressions would evaluate to the string "racecar"? YOUR PROGRESS
19
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F
Answers save as you go · flagged questions come back at the end