adplus-dvertising
frame-decoration

Question

Which of the following is the correct output for the C#.NET program given below?

int i = 20 ;
for( ; ; )
{
    Console.Write(i + " "); 
    if (i >= -10)
        i -= 4; 
    else 
        break;
}

a.

20 16 12 84 0 -4 -8

b.

20 16 12 8 4 0

c.

20 16 12 8 4 0 -4 -8 -12

d.

16 12 8 4 0

Answer: (c).20 16 12 8 4 0 -4 -8 -12

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following is the correct output for the C#.NET program given below?

Similar Questions

Discover Related MCQs