adplus-dvertising
frame-decoration

Question

Select the output for the following set of code :
static void Main(string[] args)
 {
     int i;
     for (i = 0;  ; )
     {
         Console.WriteLine("hello");
     }
     Console.ReadLine();
 }

a.

No output

b.

hello

c.

hello printed infinite times

d.

Code will give error as expression syntax

Posted under C# programming

Answer: (c).hello printed infinite times

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Select the output for the following set of code :