static void Main(string[] args) { int i = 0; int j = 0; for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { if (i > 1) continue; Console.WriteLine("Hi \n"); } } Console.ReadLine(); }
a) Prints hi 4 times
b) Prints hi 3 times
c) Prints hi 6 times
d) Prints hi infinite times
c
Explanation: Condition executes until and unless i < 5. So, it prints “hello” until ‘i’ condition is satisfied.
Output :
Hello
Hello
Hello
Hello
Hello