C-18-Q007mediumsingle_mcq
Nested loops are most useful when a programme needs to:
Nested loops are most useful when a programme needs to:
- aRepeat one task in a flat manner
- bRepeat a task that itself contains a repeated sub-task
- cAvoid all repetition
- dReplace conditional statements
ব্যাখ্যা
Nested loops are ideal when a repeated task itself contains another task that must be repeated, such as processing every cell in each row of a table. The inner repetition handles the sub-task while the outer repetition handles the main task.