C-17-Q080mediumsingle_mcq
The for loop is described as suitable when:
The for loop is described as suitable when:
- aThe number of iterations is unknown
- bWe know how many times the loop will be executed
- cThe loop never terminates
- dThere are no iterations at all
ব্যাখ্যা
A for loop is a count-controlled loop, so it is the right choice when the number of repetitions is fixed and known in advance. When the iteration count is unknown, a while loop is preferred instead.