ExamVeda
Login
Home
Basic Syntax and Data Types in C Sharp
?

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++)
        {
            int j = 0;
            j += i; 
            Console. WriteLine(j);
        }
        Console. WriteLine(i);
        Console. ReadLine();
    }
}

Answer & Solution
Correct Answer: Option B
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.