Home / Questions / Name two jump statements and their use.
Explanatory Question

Name two jump statements and their use.

👁 95 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

(i) Break Statement: The break statement is used to exit a loop or terminate a switch statement before it has completed its normal course. It immediately ends the current loop iteration and jumps to the statement following the loop or switch block.

(ii) Continue Statement: The continue statement is used to skip the current iteration of a loop and proceed to the next iteration. It is particularly useful when you want to skip certain values or conditions within a loop.