Sail E0 Webinar
Question
What is the output of this C code?

    int main()

    {

        int i = 0, j = 0;

        for (i; i < 2; i++){

            for (j = 0; j < 3; j++){

                printf("1\n");

                break;

            }

            printf("2\n");

        }

        printf("after loop\n");

    }

Options:
A .  1     2     after loop
B .  1     after loop
C .  1     2     1     2     after loop
D .  1     1     2     after loop
Answer: Option C


none



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers