What will be the output of the following C# code?
class Program
{
public static void Main(string[] args)
{
int i = 100;
for (a = 0; a < 5; a++)
{
int i = 200;
Console. WriteLine(a * i);
}
Console. ReadLine();
}
}
class Program
{
public static void Main(string[] args)
{
int i = 100;
for (a = 0; a < 5; a++)
{
int i = 200;
Console. WriteLine(a * i);
}
Console. ReadLine();
}
}
A. 5, 10, 15, 20
B. 0, 5, 10, 20
C. Compile time error
D. 0, 1, 2, 3, 4
Answer: Option C
Join The Discussion