Answer the following statements true (T) or false (F)

1. All loops have the three steps: initialize, test and update.
2. If a sentinel-controlled loop is reading integers, the sentinel could be a character.
3. What will the value of the flag be when the following loop exits:
bool flag = false;
while (!flag)
{
…..
}
4. The inner loop below will execute 25 times:
for (int a = 0; a < 5; a ++)
for (int b = 0; b < 5; b = b + 2)
….
5. If your code has an if statement inside a while loop with the same condition, you should consider using a do…while loop.


1. True
2. False
3. True
4. False
5. True

Computer Science & Information Technology

You might also like to view...

When a message is forwarded, the original message text is included in the message window.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

In order to find a word that begins with specific letters, use the:

A) Match suffix option. B) Match prefix option. C) Find all word forms option. D) Sounds like option.

Computer Science & Information Technology

Cell locks are NOT enforced until worksheet protection is enabled

Indicate whether the statement is true or false.

Computer Science & Information Technology

The lower the time in milliseconds it takes to turn a pixel on or off on an LCD monitor, the slower the response time.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology