In the lab, index = (index + 1) % photos.size is used to:
- Sort names
- Delete photos
- Count clicks only
- Cycle back to the first student after the last one
Answer
D) Cycle back to the first student after the last one
The modulo wraps the index around to 0.
Computer Science MCQ · More Lab: Student Information App Using Resources MCQs · Practise