← Quiz: Reviewing AI Code: all 10 questions
Quiz: Reviewing AI Code · Question 7 of 10
An AI's pagination function returns items 21–40 for page 1 when pages start at 1. What kind of bug is this?
An AI's pagination function returns items 21–40 for page 1 when pages start at 1. What kind of bug is this?
- A.A timezone bug
- B.A swallowed exception
- C.An off-by-one error in the slice start
- D.A floating-point rounding error
Answer & explanation
Correct answer: An off-by-one error in the slice start
Page n should start at (n − 1) × size.
Can you get the rest right without peeking?
Take the timed Quiz: Reviewing AI Code quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →