Where is it legal to put a break statement? What does the break do there?

a) A break is placed in a simple (unnested) loop, to terminate the loop.
b) A break is placed in an inner block of nested blocks, to transfer control beyond the end of block the break is within.
c) A break is placed in a loop in nested loops, to transfer control beyond the end of the innermost loop the break is within.
d) A break is placed in a switch statement, to terminate the switch by transferring control beyond the end of the switch.
e) A break is placed in a loop where it restarts the loop.

a) A break is placed in a simple (unnested) loop, to terminate the loop., c) A break is placed in a loop in nested loops, to transfer control beyond the end of the innermost loop the break is within., and d) A break is placed in a switch statement, to terminate the switch by transferring control beyond the end of the switch.

Computer Science & Information Technology

You might also like to view...

Primary clustering occurs in

a. linear probing b. quadratic probing c. separate chaining d. all of the above e. none of (a), (b), and (c)

Computer Science & Information Technology

PowerPoint does not allow you to change the default appearance of bullets in a slide show.

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

Computer Science & Information Technology