Advertisements
Advertisements
प्रश्न
Which of the following for loop will not be an infinite loop?
पर्याय
for(; ;)
for (a = 0; a < 1; a--)
for (a = 0; ; a++)
for (a = −1; a < 1; a++)
MCQ
उत्तर
for (a = −1; a < 1; a++)
Explanation:
for(a = -1; a < 1; a++)
is not an infinite loop because a
starts at -1
and increments until a < 1
becomes false.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?