The loop that is best when the number of iterations is known in advance is:
Correct answer
C. for loop
12 views
C. for loop
12 views
A for loop is ideal when you know how many times to repeat. It combines initialisation, condition, and increment in one line. while and do-while are better for uncertain iterations.
Asked in: Matric,FBISE
Not sure why the answer is C? Ask here and get an explanation.