Which type of loop is BEST suited for displaying the names of 10 students in a class from a file?(1 point)

Choose the best answer choice.

switch case statement

do...while loop

for loop

while loop

1 answer

The best answer choice for displaying the names of 10 students in a class from a file is the for loop.

A for loop is particularly well-suited for situations where you know the exact number of iterations in advance (in this case, 10 students), allowing for concise control over the loop index.