Kimberly is debugging a program where a loop intended to run 10 times is running indefinitely. Which part of the loop should she particularly inspect for possible logical errors?

  • Loop body
  • Loop condition
  • Loop increment
  • Loop initialization
Kimberly should inspect the loop condition. If the loop condition is not properly defined or is always true, the loop will run indefinitely. She should ensure that the condition is correctly set to run the loop the intended number of times (in this case, 10).
Add your answer
Loading...

Leave a comment

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