Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

6.14 Exercises, Problems, and Projects .14.1 Multiple Choice Exercises 1. How do

ID: 665457 • Letter: 6

Question

6.14 Exercises, Problems, and Projects .14.1 Multiple Choice Exercises 1. How do you discover that you have an infinite loop in your code? The code does not compile The code compiles and runs but gives the wrong result. O The code runs forever The code compiles, but there is a runtime error. 2. If you want to execute a loop body at least once, what type of loop would you use? O for loop while loop do/while loop none of the above 3. What best describes a for loop? O It is a count-controlled loop O It is an event-controlled loop O It is a sentinel-controlled loop.

Explanation / Answer

1. The code runs forever

2. do/while loop

3. It is a sentinel controlled loop

5. HelloHello

8. i = 20, sum = 54