πŸ“Š C#
Q. What will be the output of the following C# code?
Code:
static void Main(string[] args)
 {
     const int a = 5;
     const int b = 6;
     for (int i = 1; i <= 5; i++)
     {
         a = a * i;
         b = b * i;
     }
     Console.WriteLine(a);
     Console.WriteLine(b);
     Console.ReadLine();
 }
  • (A) 600, 720
  • (B) Compile time error
  • (C) 25, 30
  • (D) 5, 6
πŸ’¬ Discuss
βœ… Correct Answer: (B) Compile time error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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