Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Break and Continue Keywords in C++ Loops | Section
C++ Loops

bookBreak and Continue Keywords in C++ Loops

メニューを表示するにはスワイプしてください

There are two keywords that allow for more flexible work with loops: break and continue. They are control flow statements used within the loops to alter their behavior.

Continue

When the continue keyword is encountered within a loop, it immediately transfers control to the next iteration of the loop, skipping the remaining statements within the current iteration. In other words, it allows you to skip the current iteration of the loop and proceed with the next iteration.

Break

When the break keyword is encountered within a loop, it immediately transfers control out of the loop, effectively ending the loop prematurely. In other words, it allows you to exit the loop before it would normally complete all its iterations, skipping any remaining iterations and the statements within them.

1. What does the break keyword do when encountered within a loop?

2. What does the continue keyword do when encountered within a loop?

question mark

What does the break keyword do when encountered within a loop?

正しい答えを選んでください

question mark

What does the continue keyword do when encountered within a loop?

正しい答えを選んでください

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  4

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 1.  4
some-alt