Will the following program terminate?

```
int balance = 10;

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

a. Yes
b. No


a. Yes
Before the loop, balance is 10. The loop-continuation-condition is always true. In the first iteration, balance is reduced to 1. In the second iteration, the break statement is executed since (balance < 9) is now true. The correct answer for this question is A.

Computer Science & Information Technology

You might also like to view...

What number follows 55 in the series below?1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ____

A. 63 B. 68 C. 76 D. 89

Computer Science & Information Technology

The 8-bit Indexed color mode uses a palette of ____ colors.

a. 64 b. 128 c. 256 d. 16.7 million

Computer Science & Information Technology

The _________ property describes the first element withinnode.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The ____________________ Tool moves individual anchor points.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology