Vidyalelo
C# Programming · Q50

Control Flow Statements in C Sharp

Programming · C# Programming · question 50

Q50

What will be the output of the following C# code? static void Main(string[] args) int i = -10; for ( ;Convert.ToBoolean(Convert.ToInt32(i)) ;Console.WriteLine(i++)) ; Console.ReadLine();

A.
-9 -8 -7 -6 -5 -4 -3 -2 -1
B.
-10 -9 -8 -7 -6 -5 -4 -3 -2
C.
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1
Answer
D.
-8 -7 -6 -5 -4 -3 -2 -1

Answer: Option C

Solution

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