Home / C Programming / Control Structures :: Discussion

Discussion :: Control Structures

  1. What will be the output of the following code?

    #include

    void main()

    {

    int s=0;

    while(s++<10)

    {

    if(s<4 && s<9)

    continue;

    printf("%dt", s);

    }

    }

  2. A.

     1 2 3 4 5 6 7 8 9

    B.

     1 2 3 10

    C.

     4 5 6 7 8 9 10

    D.

     4 5 6 7 8 9

    E.

     None of these

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    'If' statement only true when value of 's' is less then 4


Be The First To Comment