Vidyalelo
C# Programming · Q108

Basic Syntax and Data Types in C Sharp

Programming · C# Programming · question 108

Q108

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();

A.
5, 10, 15, 20
B.
0, 5, 10, 20
C.
Compile time error
Answer
D.
0, 1, 2, 3, 4

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board