Give the output of the following program segment and also mention how many times the loop is executed : int i; for (i = 5; i > 10; i++) System.out.println(i); System.out.println(i * 4);
Advertisements
Question
Give the output of the following program segment and also mention how many times the loop is executed :
int i;
for (i = 5; i > 10; i++)
System.out.println(i);
System.out.println(i * 4);One Line Answer
Advertisements
Solution
20. Loop will be executed for 0 times.
shaalaa.com
Introduction of Nested Loop
Is there an error in this question or solution?
