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) c) d) are correct
You might also like to view...
A snapshot refers to a captured image that can be annotated, saved, copied, or shared via email
Indicate whether the statement is true or false
Which of the following commands is used to obtain an IP address from the DHCP server?
A. ipconfig /renew B. ping -t C. nslookup D. msconfig