Advertisements
Advertisements
प्रश्न
Give the output of the following program segment. How many times is the loop executed?
for(x=10;x>20;x++)
System.out.println(x);
System.out.println(x*2);
एक पंक्ति में उत्तर
उत्तर
The for loop will run 0 times as the condition is false, and the loop is entry-controlled.
shaalaa.com
Types of Nested Loops
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?