Jasmine Tamrakar
8 years ago

The continue statement can't be used with

A. For

B. Do

C. Switch

D. While

Answer: Option C

Solution (By Examveda Team)

The continue statement is used in loops to skip the rest of the code inside the loop for the current iteration and move to the next iteration.

It can be used with the following loops:

For Loop:
The continue statement skips the current iteration and proceeds to the next iteration of the for loop.

Do-While Loop:
Similarly, in a do-while loop, the continue statement skips to the next iteration after evaluating the condition.

While Loop:
In a while loop, the continue statement also skips the current iteration and evaluates the condition for the next iteration.

However, the continue statement cannot be used with a switch statement because switch is a control statement, not a loop. The switch statement is used to select one of many code blocks to be executed based on the value of a variable or expression.

Therefore, the correct answer is Option C: Switch.

This Question Belongs to User Ask Question >> Miscellaneous

Join The Discussion

Comments (2)

  1. Deep Jadvani
    Deep Jadvani:
    4 years ago

    Loops in C language are implemented using ? *

  2. Deep Jadvani
    Deep Jadvani:
    4 years ago

    Directives are translated by the *

Related User Ask Questions