Quiz on Repetition with Loops

Test your knowledge of repetition with loops.

1

What is the result when the following program is executed?

class Test
{
    static void Main()
    {
      for (int i = 0; i < 3; i++)
      {
        System.Console.Write(i + " ");
      }
    }
}
A)

1 2 3

B)

0 1 2

C)

3 2 1

D)

3

Question 1 of 60 attempted

Get hands-on with 1400+ tech skills courses.