A do-while loop is particularly useful when you want to ensure the loop body executes at least ________ before checking the condition.

  • Once
  • Twice
  • Never
  • Once or more
A do-while loop is useful when you want to guarantee that the loop body executes at least "once" before checking the condition. This is because in a do-while loop, the condition is evaluated after the loop body, ensuring that the code inside the loop executes at least once, even if the condition is initially false.
Add your answer
Loading...

Leave a comment

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