For Loop

Pre Test

  1. What is the way to suddenly come out of or quit any Loop in C Language?

  2. continue; statement
    break; statement
    leave; statement
    quit; statement

  3. What is the output of C Program?

  4. int main()
    {
    int k;
    for(;;)
    {
    printf("TESTING\n");
    break;
    }
    return 0;
    }

    No Output
    TESTING
    Compiler error
    None of the above

  5. What is the output of C Program?

  6. int main()
    {
    int k;
    for (printf ("FLOWER "); printf ("YELLOW "); printf("FRUITS "))
    {
    break;
    }
    return 0;
    }

    Compiler error
    FLOWER FRUITS
    FLOWER YELLOW
    FLOWER YELLOW FRUITS

  7. How long the following loop runs?

  8. For(x=0; x=3; x++)

    Three times
    Four times
    Forever
    Never

  9. The continue statement cannot be used with

  10. for
    while
    do while
    switch