Question:What will be the output of the following code?int i = 0; while (i < 3) { Console.WriteLine(i); i++; }
int i = 0; while (i < 3) { Console.WriteLine(i); i++; }
A 0 1 2 B 1 2 3 C 0 1 2 3 D 0 1
+ AnswerA
+ ExplanationThe loop runs while i is less than 3, printing 0, 1, and 2.
+ Report