Deck 8: Dountil Control Structure
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/30
Play
Full screen (f)
Deck 8: Dountil Control Structure
1
If condition q is NUM < VALUE,what is condition not q?
A)VALUE < NUM
B)VALUE > NUM
C)NUM = VALUE
D)NUM ≥ VALUE
A)VALUE < NUM
B)VALUE > NUM
C)NUM = VALUE
D)NUM ≥ VALUE
D
2
What is the value of the variable ACCUM after instructions corresponding to the following pseudocode are executed?
COUNT
DOUNTIL COUNT
COUNT COUNT + 1
ENDDO
A)8
B)16
C)32
D)64
COUNT
DOUNTIL COUNT
COUNT COUNT + 1
ENDDO
A)8
B)16
C)32
D)64
16
3
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
Read START
COUNT START
DOUNTIL COUNT START COUNT COUNT - 1
Write COUNT
ENDDO
A)0
B)1
C)8
D)infinite
1
4
A DOWHILE loop is more flexible than a DOUNTIL loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
5
If condition q is NUM ≤ VALUE,what is condition not q?
A)VALUE > NUM
B)NUM > VALUE
C)VALUE = NUM
D)NUM ≥ VALUE
A)VALUE > NUM
B)NUM > VALUE
C)VALUE = NUM
D)NUM ≥ VALUE
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
6
A DOWHILE loop is composed of a combination of the SIMPLE SEQUENCE control structure and the DOUNTIL control structure.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
7
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
Read START
COUNT START
DOUNTIL COUNT START COUNT COUNT - 1 Write COUNT
ENDDO
A)0
B)1
C)8
D)infinite
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
8
To create a properly formed DOUNTIL loop you must
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
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
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
9
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
A)3
B)4
C)5
D)6
A)3
B)4
C)5
D)6
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
10
When a DOUNTIL loop is encountered during processing,the steps in the DOUNTIL loop must be executed at least once.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
11
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
DOUNTIL COUNT
COUNT COUNT + 1
ENDDO
ANSWER
A)5
B)100
C)105
D)125
DOUNTIL COUNT
COUNT COUNT + 1
ENDDO
ANSWER
A)5
B)100
C)105
D)125
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
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
Read START
COUNT START
DOUNTIL COUNT START COUNT COUNT + 1
Write COUNT
ENDDO
A)0
B)1
C)8
D)infinite
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
13
In a DOUNTIL loop the priming read is placed at the beginning of the loop steps.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
14
How many values will be output when the instructions corresponding to the following pseudocode are executed?
DOUNTIL COUNT
COUNT COUNT + 1
Write ACCUM
ENDDO
A)4
B)5
C)8
D)16
DOUNTIL COUNT
COUNT COUNT + 1
Write ACCUM
ENDDO
A)4
B)5
C)8
D)16
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
15
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
A)5
B)100
C)105
D)125
A)5
B)100
C)105
D)125
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
16
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
SUM
DOUNTIL COUNT
COUNT COUNT + 1
ENDDO
ANSWER SUM
A)110
B)115
C)120
D)125
SUM
DOUNTIL COUNT
COUNT COUNT + 1
ENDDO
ANSWER SUM
A)110
B)115
C)120
D)125
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
17
What type of loop is always executed a predetermined number of times?
A)DOWHILE
B)DOUNTIL
C)both a and b
D)neither a nor b
A)DOWHILE
B)DOUNTIL
C)both a and b
D)neither a nor b
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
18
Which of the following is not one of the basic control structures?
A)SIMPLE SEQUENCE
B)IFTHENELSE
C)DOWHILE
D)DOUNTIL
A)SIMPLE SEQUENCE
B)IFTHENELSE
C)DOWHILE
D)DOUNTIL
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
19
A DOUNTIL loop is a leading-decision program loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
20
If condition q is NUM ≠ VALUE,what is condition not q?
A)VALUE > NUM
B)NUM > VALUE
C)VALUE = NUM
D)NUM ≥ VALUE
A)VALUE > NUM
B)NUM > VALUE
C)VALUE = NUM
D)NUM ≥ VALUE
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
21
To create a properly formed DOUNTIL loop on a program flowchart you must place the loop test after all the steps within the loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
22
A DOUNTIL loop cannot be used if automatic end-of-file processing is needed to control the loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
23
The steps within a DOUNTIL loop are always placed on the line after DOUNTIL and are indented a few positions for clarity.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
24
In header record logic the DOUNTIL loop is not controlled by a counter as it is with a DOWHILE loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
25
To create a properly formed DOUNTIL loop you must place the loop steps in the YES path of the loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
26
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.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
27
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.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
28
In pseudocode,the DOUNTIL statement is positioned after the loop steps.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
29
The READ statement used to input the header record must be placed before the DOUNTIL loop test.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
30
A DOUNTIL loop is exited when the tested condition is true.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck