Which of the following statements about the continue statement is true?
a. The continue statement is used to exit an iteration structure early and continue execution after the loop.
b. The continue statement is used to continue after a switch statement.
c. The continue statement does not alter the flow of control.
d. A continue statement proceeds with the next iteration of the immediately enclosing while, for, do…while statement.

Respuesta :

Answer:

Option (d)

Explanation:

  • The Continue statement is used inside the looping statements.
  • When a Continue statement is encountered inside the loop, it stops executing the current iteration ( it skips the next steps in the current iteration) and goes to the next iteration.
  • It then continues to execute the loop for the next iteration.
  • The continue statement can be used in all the looping structures ( for loop, while loop, do while loop ).
  • The syntax for continue statement is " [tex]continue;[/tex] "
  • Options (a),(b),(c) are wrong options.
  • Option (d) is correct option.