Question discussion

Which of the following will terminate the loop immediately in C?

359281Medium DSSSB TGT Computer Science 0 replies 0 views
0
Which of the following will terminate the loop immediately in C?
  • AWhen a break statement is encountered
  • BWhen the loop variable reaches a certain value
  • CWhen a continue statement is encountered
  • DWhen the loop condition is not given
Correct answer: A

Explanation

A break statement terminates the loop immediately, while continue only skips the current iteration.

Discussion 0

Nobody has replied yet. Start the discussion!