Skip to main content

What is the difference between break and continue?

Junior C#
Quick Answer Both work inside loops. break exits the loop entirely รขโ‚ฌโ€ done, move on. continue skips the rest of the current iteration and jumps to the next one. Think of break as stop the loop and continue as skip this round but keep going.

Answer

break: Immediately exits the loop.

continue: Skips the current iteration and moves to the next one.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice