Examveda

What will be the output of the following C# code?
class Program
{
    static void Main(string[] args)
    {
        int  i ;
        for (i = 0; i < 5; i++)
        {
            Console.WriteLine(i);
        }
        Console.ReadLine();
    }
}

A. 0, 1, 2, 3, 4, 5

B. 0, 1, 2, 3

C. 0, 1, 2, 3, 4

D. 0, 0, 0, 0, 0

Answer: Option C


Join The Discussion

Related Questions on Basic Syntax and Data Types in C Sharp