🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.A timezone bug
  2. B.A swallowed exception
  3. C.An off-by-one error in the slice start
  4. 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 →