Q. What will be the output of the following C# code?

Code:
class Program
 {
     static void Main(string[] args)
     {
         int i;
         for ( i = 0; i < 5; i++)
         {
 
         }
         Console. WriteLine(i);
         Console. ReadLine();
     }
}
  • (A) 0, 1, 2, 3, 4, 5
  • (B) 0, 1, 2, 3, 4
  • (C) 5
  • (D) 4
πŸ’¬ Discuss
βœ… Correct Answer: (C) 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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