The ______ loop in C++ is unique because it evaluates its condition after executing the loop body, ensuring the loop body runs at least once.

  • do-while
  • for
  • if
  • while
The do-while loop in C++ is distinctive because it guarantees that the loop body will execute at least once. It first executes the loop body and then evaluates the condition. This behavior is useful when you want to ensure that a certain piece of code runs before checking the loop condition.
Add your answer
Loading...

Leave a comment

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