Vidyalelo
C# Programming · Q52

Control Flow Statements in C Sharp

Programming · C# Programming · question 52

Q52

What will be the output of the following C# code? static void Main(string[] args) int i = 1, j; do for (j = 1; ; j++) if (j > 2) break; if (i == j) continue; Console.WriteLine(i + " " + j); i++; while (i < 3); Console.ReadLine();

A.
1 2
2 1
Answer
B.
2 1
1 2
C.
1 3
2 1
D.
1 1
2 1

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board