Question 7
Back to Exercise
Which of these is a valid infinite loop that needs a break to stop?
- A for () { … }
- B for (;;) { … } Correct
- C for (true) { … }
- D loop { … }
Correct Answer: Option B
All three parts of a for header are optional; an empty condition counts as true. while (true) works the same way.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!