The following code ‘for(;;)’ represents an infinite loop. Which statement exits the loop itself?
Answer: A
Correct answer: break
break is the statement that ends the loop: control passes to the statement after it and the program carries on. exit(0) and abort() would also stop the loop running, but only by ending the whole program, which is a different thing from leaving the loop.
Please log in or register to report this question.