Which command is used to skip the rest of a loop and carry on from the top of the loop again?
A. break
B. resume
C. continue
D. skip
E. None of these
Answer: Option C
Solution(By Examveda Team)
Syntax: continue ;Causes control to pass to the end of the innermost enclosing while, do, or for statement, at that point the loop continuation condition is re-evaluated. Example:
for(i = 0; i < 20; i++){
if(array[i] == 0)
continue;
array[i] = 1/array[i];
}
Join The Discussion
Comments ( 1 )
Related Questions on Control Structures
Which control structure is used to repeatedly execute a block of code in C?
A. for loop
B. if statement
C. switch case
D. while loop
In C, what is the purpose of the 'break' statement within a loop?
A. Continue to the next iteration
B. Exit the program
C. Terminate the loop and exit it
D. Skip the current iteration
What is the purpose of the 'else' statement in C's 'if-else' control structure?
A. Execute the 'if' block
B. Execute the 'else' block
C. Execute both 'if' and 'else' blocks
D. Skip the 'if' block
Which control structure is used to make a decision between two or more alternatives in C?
A. switch case
B. for loop
C. if statement
D. while loop
yes the ans. is continue
because,continue is go directly to the statement from where loop is started.