Will the following program terminate?

```
int balance = 10;

while (true) {
if (balance < 9)
continue;
balance = balance - 9;
}
```

a. Yes
b. No


b. No
Before the loop, balance is 10. In the loop, balance becomes 1. The loop-continuation-condition is always true. When balance < 9 is true, the continue statement is executed to skip the rest statement in the iteration. So the loop continues in an infinite loop. So, the correct answer is B.

Computer Science & Information Technology

You might also like to view...

Tracking individual clients as they visit a website is known as ________.

a. session tracking. b. client tracking. c. personalization. d. None of the above.

Computer Science & Information Technology

________ is a technique where the underlying operating environment of an application is virtualized.

A) Container virtualization B) Traffic engineering C) CCN D) COTS

Computer Science & Information Technology

Microsoft ____ is full-featured Web site authoring program.

A. PowerPoint B. Word C. Expression Web 3 D. Excel

Computer Science & Information Technology

Which of the following is NOT a benefit of a macro?

A. It helps build complicated formulas. B. It saves you time. C. It repeats a task the same way each time it is run. D. It can be assigned to a button to make it easy for someone else to use.

Computer Science & Information Technology