Skip to content
Related Articles

Related Articles

Improve Article
C Quiz – 105 | Question 2
  • Difficulty Level : Basic
  • Last Updated : 09 Oct, 2015

In the context of “break” and “continue” statements in C, pick the best statement.
(A) “break” can be used in “for”, “while” and “do-while” loop body.
(B) “continue” can be used in “for”, “while” and “do-while” loop body.
(C) “break” and “continue” can be used in “for”, “while”, “do-while” loop body and “switch” body.
(D) “break” and “continue” can be used in “for”, “while” and “do-while” loop body. But only “break” can be used in “switch” body.
(E) “break” and “continue” can be used in “for”, “while” and “do-while” loop body. Besides, “continue” and “break” can be used in “switch” and “if-else” body.


Answer: (D)

Explanation: As per C standard, “continue” can be used in loop body only. “break” can be used in loop body and switch body only. That’s why correct answer is D.

Quiz of this Question

Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.
My Personal Notes arrow_drop_up
Recommended Articles
Page :