Which loop can potentially become an infinite loop if no increment/decrement operation is performed on the loop control variable?

  • do-while loop
  • for loop
  • foreach loop
  • while loop
A while loop can potentially become an infinite loop if no increment or decrement operation is performed on the loop control variable within the loop body. This happens when the loop condition always evaluates to true.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *