Professional Documents
Culture Documents
Test Bank For Tools For Structured and Object Oriented Design 7 e 7th Edition 0131194453 Full Download
Test Bank For Tools For Structured and Object Oriented Design 7 e 7th Edition 0131194453 Full Download
Test Bank For Tools For Structured and Object Oriented Design 7 e 7th Edition 0131194453 Full Download
a) SIMPLE SEQUENCE
b) IFTHENELSE
c) DOWHILE
d) DOUNTIL
Answer: d Type: M
Answer: b Type: M
Answer: c Type: M
Answer: d Type: M
a) place the loop test after any other step in the loop
b) place the loop steps in the YES path of the loop test
c) indicate that the loop will exit in the NO path of the loop test
d) all of the above
Answer: a Type: M
8-1
Tools for Structured Design - 7th edition Chapter 8 Test Bank
a) DOWHILE
b) DOUNTIL
c) both a and b
d) neither a nor b
Answer: d Type: M
7. What is the value of ANSWER after the instructions corresponding to the following
pseudocode are executed?
COUNT = 5
SUM = 100
DOUNTIL COUNT < 5
SUM = SUM + 5
COUNT = COUNT - 1
ENDDO
ANSWER = SUM
a) 5
b) 100
c) 105
d) 125
Answer: c Type: M
8. What is the value of ANSWER after the instructions corresponding to the following
pseudocode are executed?
COUNT = 0
SUM = 100
DOUNTIL COUNT ≥ 5
SUM = SUM + 5
COUNT = COUNT +1
ENDDO
ANSWER = SUM
a) 5
b) 100
c) 105
d) 125
Answer: d Type: M
8-2
Tools for Structured Design - 7th edition Chapter 8 Test Bank
9. What is the value of ANSWER after the instructions corresponding to the following
pseudocode are executed?
COUNT = 2
SUM = 100
DOUNTIL COUNT > 5
SUM = SUM + 5
COUNT = COUNT +1
ENDDO
ANSWER = SUM
a) 110
b) 115
c) 120
d) 125
Answer: c Type: M
10. What is the value of ANSWER after the instructions corresponding to the following
pseudocode are executed?
COUNT = 1
SUM = 3
DOUNTIL COUNT ≤ 1
SUM = SUM + COUNT
COUNT = COUNT - 1
ENDDO
ANSWER = SUM
a) 3
b) 4
c) 5
d) 6
Answer: b Type: M
8-3
Tools for Structured Design - 7th edition Chapter 8 Test Bank
11. If the value input for START is 8, how many times will the loop steps in the instructions
corresponding to the following pseudocode be executed?
Read START
COUNT = START
DOUNTIL COUNT ≥ START
COUNT = COUNT - 1
Write COUNT
ENDDO
a) 0
b) 1
c) 8
d) infinite
Answer: d Type: M
12. If the value input for START is 8, how many times will the loop steps in instructions
corresponding to the following pseudocode be executed?
Read START
COUNT = START
DOUNTIL COUNT < START
COUNT = COUNT - 1
Write COUNT
ENDDO
a) 0
b) 1
c) 8
d) infinite
Answer: b Type: M
8-4
Tools for Structured Design - 7th edition Chapter 8 Test Bank
13. If the value input for START is 8, how many times will the loop steps in instructions
corresponding to the following pseudocode be executed?
Read START
COUNT = START
DOUNTIL COUNT ≤ START
COUNT = COUNT + 1
Write COUNT
ENDDO
a) 0
b) 1
c) 8
d) infinite
Answer: d Type: M
14. How many values will be output when the instructions corresponding to the following
pseudocode are executed?
ACCUM = 1
COUNT = 0
DOUNTIL COUNT > 4
ACCUM = ACCUM + ACCUM
COUNT = COUNT + 1
Write ACCUM
ENDDO
a) 4
b) 5
c) 8
d) 16
Answer: b Type: M
8-5
Tools for Structured Design - 7th edition Chapter 8 Test Bank
15. What is the value of the variable ACCUM after instructions corresponding to the
following pseudocode are executed?
ACCUM = 1
COUNT = 0
DOUNTIL COUNT ≥ 4
ACCUM = ACCUM + ACCUM
COUNT = COUNT + 1
ENDDO
a) 8
b) 16
c) 32
d) 64
Answer: b Type: M
16. When a DOUNTIL loop is encountered during processing, the steps in the DOUNTIL
loop must be executed at least once.
18. In a DOUNTIL loop the priming read is placed at the beginning of the loop steps.
21. A connector symbol must be placed at the entry point of a DOUNTIL loop just as it is
placed at the entry point of a DOWHILE loop.
8-6
Test Bank for Tools For Structured and Object-Oriented Design, 7/E 7th Edition : 0131194453
23. To create a properly formed DOUNTIL loop you must place the loop steps in the YES
path of the loop.
24. To create a properly formed DOUNTIL loop on a program flowchart you must place the
loop test after all the steps within the loop.
25. In a trailing-decision program loop, the test for the loop terminating condition is not
made until the other processing steps in the loop have been executed.
26. In pseudocode, the DOUNTIL statement is positioned after the loop steps.
27. The steps within a DOUNTIL loop are always placed on the line after DOUNTIL and are
indented a few positions for clarity.
28. A DOUNTIL loop cannot be used if automatic end-of-file processing is needed to control
the loop.
29. In header record logic the DOUNTIL loop is not controlled by a counter as it is with a
DOWHILE loop.
30. The READ statement used to input the header record must be placed before the
DOUNTIL loop test.
8-7