Consider int i=0; Then which of the following is not an infinite loop?

Consider int i=0; Then which of the following is not an infinite loop?

  1. a) for(;;){}
  2. b) while ( ){ }
  3. c) while ( ++i<0){ --i;}
  4. d) do {++i;} while(--i<=0);

From the NPCBL Executive Trainee (CSE) 2023 – Preliminary exam, question 33 of 39.

More from this paper