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

1. The value of count is 0; limit is 10. Evaluate:
count == 0 && limit < 20
2. The value of count is 0; limit is 10. Evaluate:
(count != 0)||(limit < 20)
3. In a while loop, the Boolean_Expression is executed before each execution of the loop body.
4. In a do-while loop, a continue statement terminates the loop.
5. A break statement is used in loops only.


1. true
The operators == and < have higher precedences than &&, hence the expressions, count == 0 and limit < 10 are evaluated (to true) then the && is executed.
2. true.
The first expression evaluates to false, the value of the || expression is determined by the second expression. The second expression is true so the || expression evaluates to true.
3. true
4. False
The continue statement causes the Boolean_Expression to be executed. If true, the body executes, otherwise the loop terminates.
5. False.
In addition to its use in loops, a break statement is used in the switch statement to transfer control to the next statement after the switch block.

Computer Science & Information Technology

You might also like to view...

The example on page 35 shows that man pages for passwd appear in sec- tions 1 and 5 of the system manual. Explain how you can use man to determine which sections of the system manual contain a manual page with a given name.

What will be an ideal response?

Computer Science & Information Technology

Changing the application title helps to better identify the application and give it a(n) ________ separate from the actual database

A) identity B) startup form C) navigation form D) tool

Computer Science & Information Technology

Thegroup-byattribute specifies the node set containing the grouped values.

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

Computer Science & Information Technology

Suppose you have created several messages for the Scene class. You would then send these messages to a Scene object by referring to the object as ____,

A. receiver B. scene C. target D. this

Computer Science & Information Technology