adplus-dvertising
frame-decoration

Question

Select the output for the following set of code :
static void Main(string[] args)
{
    int x = 0;
    do
    {
        x++;
        if (x == 5)
        {
            x++;
            continue;
            break;
        }
        Console.WriteLine(x + " ");
    }
}while (x < 10);

a.

1 2 3 4 5

b.

10

c.

5 6 7 8 9 10

d.

1 2 3 4 5 6 7 8 9 10

Answer: (d).1 2 3 4 5 6 7 8 9 10

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Select the output for the following set of code :