Home / C Programming / Control Structures :: Discussion

Discussion :: Control Structures

  1. Which command is used to skip the rest of a loop and carry on from the top of the loop again?

  2. A.

     break

    B.

     resume

    C.

     continue

    D.

     skip

    E.

     None of these

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    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];

    }


Be The First To Comment