What is the output of the program, for loop - CSharp Language Basics

CSharp examples for Language Basics:for

Description

What is the output of the program, for loop

Demo Code

class MainClass//from w  ww . jav  a  2 s  . c o m
{
   static void Main()
   {
      int x;
      for ( x = 0; ++x <= 10; System.Console.WriteLine("{0}", x))
         ;
      }
}

Result


Related Tutorials