What will happen if the condition in the "for" loop is always true?

  • The loop will run indefinitely
  • The loop will not run
  • The loop will run only once
  • The loop will skip iterations
If the condition in a "for" loop is always true, the loop will run indefinitely, resulting in an infinite loop. This can cause the program to become unresponsive or crash, so it's crucial to ensure that the loop condition eventually becomes false to exit the loop.
Add your answer
Loading...

Leave a comment

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