Question discussion

What is the output of the following statements?for(i=10; i++; i

305301Medium 1 reply 584 views
35
What is the output of the following statements?for(i=10; i++; i<15) printf("%d ", i);
  • A10 11 12 13 14
  • B10 11 12 13 14 15
  • C9 10 11 12 13
  • DInfinite loop
  • ENone of these
Correct answer: D

Discussion 1

0
CCommunity
Infinite loop

Since the condition is always true it will go to infinite loop.