Bird
Raised Fist0

A REST API has 120 records. If each page returns 15 records, how many pages must be requested to retrieve all records?

medium📝 Predict Output Q5 of Q15
Rest API - Pagination Patterns
A REST API has 120 records. If each page returns 15 records, how many pages must be requested to retrieve all records?
A7
B6
C8
D9
Step-by-Step Solution
Solution:
  1. Step 1: Calculate total pages

    Divide total records (120) by records per page (15): 120 / 15 = 8.
  2. Step 2: Check for remainder

    Since 120 is exactly divisible by 15, no extra page is needed.
  3. Final Answer:

    8 -> Option C
  4. Quick Check:

    120 ÷ 15 = 8 pages total [OK]
Quick Trick: Divide total items by limit to find pages [OK]
Common Mistakes:
MISTAKES
  • Forgetting to round up when there's a remainder
  • Miscounting total records
  • Assuming zero-based page count

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes