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

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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