Deck 5: Dowhile Control Structuretrailer Record Logic

ملء الشاشة (f)
exit full mode
سؤال
A variable whose value does not change during program execution is called a

A)constant
B)named constant
C)static variable
D)initialized variable
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
How many times will the loop steps in the instructions corresponding to the following pseudocode be executed,assuming 5 values - 5,6,7,3,0 - are input,one on each record?
Read SCORE
DOWHILE SCORE >0> 0
Write SCORE
ENDDO

A)0
B)4
C)5
D)infinite
سؤال
How many times will the loop steps in the instructions corresponding to the following pseudocode be executed,assuming 5 values - 0,6,7,3,0 - are input,one on each record?
DOWHILE SCORE >0> 0
Read SCORE Write SCORE
ENDDO

A)0
B)5
C)unknown
D)infinite
سؤال
What type of line is placed within the loop and outputs information about an individual record?

A)heading
B)detail
C)total
D)both b and c
سؤال
What value of COUNT will be output after the instructions corresponding to the following pseudocode are executed,assuming 7 values - 5,6,7,3,0,4,2 - are input,one on each record?
 COUNT =0 SUM =0 VALUE =1 Read VALUE  DOWHILE VALUE >0 Write Value  SUM = SUM + VALUE  COUNT = COUNT +1 Read VALUE  ENDDO  Write SUM, COUNT \begin{array} { l } \text { COUNT } = 0 \\\text { SUM } = 0 \\\text { VALUE } = 1 \\\text { Read VALUE } \\\text { DOWHILE VALUE } > 0 \\\text { Write Value } \\\quad \text { SUM } = \text { SUM } + \text { VALUE } \\\quad \text { COUNT } = \text { COUNT } + 1 \\\quad \text { Read VALUE } \\\text { ENDDO } \\\text { Write SUM, COUNT }\end{array}

A)4
B)5
C)6
D)7
سؤال
In trailer record logic a counter is used to control the loop.
سؤال
How many times will the loop steps in the instructions corresponding to the following pseudocode be executed,assuming 5 values - 5,6,7,3,0 - are input,one on each record?
Read SCORE
DOWHILE SCORE >0> 0
Read SCORE
Write SCORE
ENDDO

A)0
B)4
C)5
D)infinite
سؤال
A trailer record is also called a(n)

A)constant data value
B)sentinel value
C)9s record
D)EOF record
سؤال
The loop read is always executed more than one time.
سؤال
What value of COUNT will be output after the instructions corresponding to the following pseudocode are executed,assuming 7 values - 5,6,7,3,0,4,2 - are input,one on each record?
 COUNT =0 SUM =0 VALUE =1 DOWHILE VALUE >0 Read VALUE  Write Value  SUM = SUM + VALUE  COUNT = COUNT +1\begin{array} { l } \text { COUNT } = 0 \\\text { SUM } = 0 \\\text { VALUE } = 1 \\\text { DOWHILE VALUE } > 0 \\\text { Read VALUE } \\\text { Write Value } \\\text { SUM } = \text { SUM } + \text { VALUE } \\\text { COUNT } = \text { COUNT } + 1\end{array}
ENDDO
Write SUM, COUNT

A)4
B)5
C)6
D)7
سؤال
What value of COUNT will be output after the instructions corresponding to the following pseudocode are executed,assuming 7 values - 5,6,7,3,0,4,2 - are input,one on each record?
 COUNT =0 SUM =0 VALUE =1 DOWHILE VALUE >0 Write Value  SUM = SUM + VALUE  COUNT = COUNT +1 Read VALUE  ENDDO  Write SUM, COUNT \begin{array} { l } \text { COUNT } = 0 \\\text { SUM } = 0 \\\text { VALUE } = 1 \\\text { DOWHILE VALUE } > 0 \\\text { Write Value } \\\quad \text { SUM } = \text { SUM } + \text { VALUE } \\\text { COUNT } = \text { COUNT } + 1 \\\text { Read VALUE } \\\text { ENDDO } \\\text { Write SUM, COUNT }\end{array}

A)4
B)5
C)6
D)7
سؤال
A total line is a line of output associated with one input record.
سؤال
The empty file condition can occur in both header record logic and trailer record logic.
سؤال
The priming read is placed

A)before the loop
B)within the loop as the first statement
C)within the loop as the last statement
D)after the loop
سؤال
The loop read in a loop controlled using trailer record logic is placed

A)before the loop
B)within the loop as the first statement
C)within the loop as the last statement
D)after the loop
سؤال
How many times will the loop steps in the instructions corresponding to the following pseudocode be executed,assuming 5 values - 0,8,6,3,0 - are input,one on each record?
Read SCORE
DOWHILE SCORE >0> 0
Write SCORE
Read SCORE
ENDDO

A)0
B)4
C)5
D)infinite
سؤال
What statement(s)are unnecessary in the following pseudocode?
COUNT=0\mathrm { COUNT } = 0
SUM =0= 0
Read VALUE
DOWHILE VALUE >0> 0
SUM == SUM + VALUE
COUNT == COUNT + 1
Read VALUE
ENDDO
Write SUM

A)COUNT = 0 and COUNT = COUNT + 1
B)SUM = 0 and SUM = SUM + VALUE
C)The first Read VALUE
D)The second Read VALUE
سؤال
Where is the write statement for a total line generally placed?

A)before the loop
B)within the loop as the first statement
C)within the loop as the last statement
D)after the loop
سؤال
The automatic end-of-file facility is implemented differently in different programming languages.
سؤال
How many times will the loop steps in the instructions corresponding to the following pseudocode be executed,assuming 5 values - 5,6,7,3,0 - are input,one on each record?
Read SCORE
DOWHILE SCORE >0> 0
Write SCORE
Read SCORE
ENDDO

A)0
B)4
C)5
D)infinite
سؤال
If you are using the automatic end-of-file facility,you need to include a special record at the end of the input denoting that there is no more data to process.
سؤال
Line count and page count are special types of trailer records.
سؤال
The priming read is usually placed as the first step within the loop.
سؤال
A line that outputs the average grade for each student can be considered in some cases,both a detail line and a total line.
سؤال
A detail line is usually written after the loop is exited.
سؤال
In trailer record logic the number of times the loop will be executed is preset.
سؤال
The loop read in a loop controlled using trailer record logic is usually placed as the last step in the loop.
سؤال
A heading line serves as a title to a report that is output.
سؤال
The use of named constants makes an algorithm more flexible.
سؤال
A trailer record must contain special information that differentiates it from the rest of the input.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/30
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 5: Dowhile Control Structuretrailer Record Logic
1
A variable whose value does not change during program execution is called a

A)constant
B)named constant
C)static variable
D)initialized variable
B
2
How many times will the loop steps in the instructions corresponding to the following pseudocode be executed,assuming 5 values - 5,6,7,3,0 - are input,one on each record?
Read SCORE
DOWHILE SCORE >0> 0
Write SCORE
ENDDO

A)0
B)4
C)5
D)infinite
infinite
3
How many times will the loop steps in the instructions corresponding to the following pseudocode be executed,assuming 5 values - 0,6,7,3,0 - are input,one on each record?
DOWHILE SCORE >0> 0
Read SCORE Write SCORE
ENDDO

A)0
B)5
C)unknown
D)infinite
unknown
4
What type of line is placed within the loop and outputs information about an individual record?

A)heading
B)detail
C)total
D)both b and c
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
5
What value of COUNT will be output after the instructions corresponding to the following pseudocode are executed,assuming 7 values - 5,6,7,3,0,4,2 - are input,one on each record?
 COUNT =0 SUM =0 VALUE =1 Read VALUE  DOWHILE VALUE >0 Write Value  SUM = SUM + VALUE  COUNT = COUNT +1 Read VALUE  ENDDO  Write SUM, COUNT \begin{array} { l } \text { COUNT } = 0 \\\text { SUM } = 0 \\\text { VALUE } = 1 \\\text { Read VALUE } \\\text { DOWHILE VALUE } > 0 \\\text { Write Value } \\\quad \text { SUM } = \text { SUM } + \text { VALUE } \\\quad \text { COUNT } = \text { COUNT } + 1 \\\quad \text { Read VALUE } \\\text { ENDDO } \\\text { Write SUM, COUNT }\end{array}

A)4
B)5
C)6
D)7
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
6
In trailer record logic a counter is used to control the loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
7
How many times will the loop steps in the instructions corresponding to the following pseudocode be executed,assuming 5 values - 5,6,7,3,0 - are input,one on each record?
Read SCORE
DOWHILE SCORE >0> 0
Read SCORE
Write SCORE
ENDDO

A)0
B)4
C)5
D)infinite
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
8
A trailer record is also called a(n)

A)constant data value
B)sentinel value
C)9s record
D)EOF record
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
9
The loop read is always executed more than one time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
10
What value of COUNT will be output after the instructions corresponding to the following pseudocode are executed,assuming 7 values - 5,6,7,3,0,4,2 - are input,one on each record?
 COUNT =0 SUM =0 VALUE =1 DOWHILE VALUE >0 Read VALUE  Write Value  SUM = SUM + VALUE  COUNT = COUNT +1\begin{array} { l } \text { COUNT } = 0 \\\text { SUM } = 0 \\\text { VALUE } = 1 \\\text { DOWHILE VALUE } > 0 \\\text { Read VALUE } \\\text { Write Value } \\\text { SUM } = \text { SUM } + \text { VALUE } \\\text { COUNT } = \text { COUNT } + 1\end{array}
ENDDO
Write SUM, COUNT

A)4
B)5
C)6
D)7
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
11
What value of COUNT will be output after the instructions corresponding to the following pseudocode are executed,assuming 7 values - 5,6,7,3,0,4,2 - are input,one on each record?
 COUNT =0 SUM =0 VALUE =1 DOWHILE VALUE >0 Write Value  SUM = SUM + VALUE  COUNT = COUNT +1 Read VALUE  ENDDO  Write SUM, COUNT \begin{array} { l } \text { COUNT } = 0 \\\text { SUM } = 0 \\\text { VALUE } = 1 \\\text { DOWHILE VALUE } > 0 \\\text { Write Value } \\\quad \text { SUM } = \text { SUM } + \text { VALUE } \\\text { COUNT } = \text { COUNT } + 1 \\\text { Read VALUE } \\\text { ENDDO } \\\text { Write SUM, COUNT }\end{array}

A)4
B)5
C)6
D)7
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
12
A total line is a line of output associated with one input record.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
13
The empty file condition can occur in both header record logic and trailer record logic.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
14
The priming read is placed

A)before the loop
B)within the loop as the first statement
C)within the loop as the last statement
D)after the loop
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
15
The loop read in a loop controlled using trailer record logic is placed

A)before the loop
B)within the loop as the first statement
C)within the loop as the last statement
D)after the loop
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
16
How many times will the loop steps in the instructions corresponding to the following pseudocode be executed,assuming 5 values - 0,8,6,3,0 - are input,one on each record?
Read SCORE
DOWHILE SCORE >0> 0
Write SCORE
Read SCORE
ENDDO

A)0
B)4
C)5
D)infinite
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
17
What statement(s)are unnecessary in the following pseudocode?
COUNT=0\mathrm { COUNT } = 0
SUM =0= 0
Read VALUE
DOWHILE VALUE >0> 0
SUM == SUM + VALUE
COUNT == COUNT + 1
Read VALUE
ENDDO
Write SUM

A)COUNT = 0 and COUNT = COUNT + 1
B)SUM = 0 and SUM = SUM + VALUE
C)The first Read VALUE
D)The second Read VALUE
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
18
Where is the write statement for a total line generally placed?

A)before the loop
B)within the loop as the first statement
C)within the loop as the last statement
D)after the loop
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
19
The automatic end-of-file facility is implemented differently in different programming languages.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
20
How many times will the loop steps in the instructions corresponding to the following pseudocode be executed,assuming 5 values - 5,6,7,3,0 - are input,one on each record?
Read SCORE
DOWHILE SCORE >0> 0
Write SCORE
Read SCORE
ENDDO

A)0
B)4
C)5
D)infinite
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
21
If you are using the automatic end-of-file facility,you need to include a special record at the end of the input denoting that there is no more data to process.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
22
Line count and page count are special types of trailer records.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
23
The priming read is usually placed as the first step within the loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
24
A line that outputs the average grade for each student can be considered in some cases,both a detail line and a total line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
25
A detail line is usually written after the loop is exited.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
26
In trailer record logic the number of times the loop will be executed is preset.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
27
The loop read in a loop controlled using trailer record logic is usually placed as the last step in the loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
28
A heading line serves as a title to a report that is output.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
29
The use of named constants makes an algorithm more flexible.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
30
A trailer record must contain special information that differentiates it from the rest of the input.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.