πŸ“Š C#
Q. What will be the output of the following C# code?
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
  • (D) 0, 1, 2, 3, 4
πŸ’¬ Discuss
βœ… Correct Answer: (C) Compile time error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
231
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Babita
Publisher
πŸ“ˆ
84%
Success Rate