The continue statement instructs the compiler to skip the rest of the statements below it in the current iteration and immediately begin the next iteration of the loop. When a continue statement is encountered within a loop, the remaining statements within the loop for the current iteration are skipped and the loop continues with the next iteration.
The continue statement is often used within loops to skip certain iterations based on certain conditions.
Syntax:
continue;
Example 1: for loop with continue statement.
f