Machine-translated by Google. Questions are authored in English.
Top

Discussion

The continue statement cannot be used with

  • A.for
  • B.while
  • C.do while
  • D.switch

Answer: D

Correct answer: switch

continue means “begin the next iteration”, so it belongs to the three loops. A switch has no iterations, so a continue written inside one is either applied to an enclosing loop or, if there is none, rejected. break, by contrast, works in all four.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.