1.
An In-Line PERFORM UNTIL tests a condition.
A.
True
B.
False
2.
The PERFORM TIMES uses an explicit counter that is initialized and incremented
within the PERFORM statement.
A.
True
B.
False
3.
When nested PERFORM VARYING statements can be combined into a single
statement, this is called PERFORM VARYING AFTER.
A.
True
B.
False
4.
PERFORM UNTIL is preferred to PERFORM TIMES when you know in advance how many times to loop.
A.
True
B.
False
5.
One method used to terminate an infinite loop in a program running on a PC is to
press the escape key.
A.
True
B.
False
6.
An example of a PERFORM structure that does not involve iteration is
PERFORM paragraph-name.
A.
True
B.
False
7.
The simple In-Line PERFORM and the In-Line PERFORM
UNTIL both test a condition.
A.
True
B.
False
8.
GO TO has a scope terminator.
A.
True
B.
False
9.
GO TO never tests a condition.
A.
True
B.
False
10.
The condition in a PERFORM UNTIL is checked after looping.
A.
True
B.
False
11.
Given PERFORM 300-LABEL-RTN, the computer know when the
last
statement in 300-LABEL-RTN is executed when it reaches a new paragraph-name or the end of the program.
A.
True
B.
False
12.
PERFORM VARYING statements can be nested.
A.
True
B.
False
13.
EXIT statements are used to make programs more modular, more structured and less prone to errors.
A.
True
B.
False
14.
PERFORM VARYING AFTER depends on the physical placement of the paragraphs to determine which paragraphs are executed.
A.
True
B.
False
15.
When is the In-Line PERFORM not a good choice of PERFORM?
_______________________________________________________________________
Answer:
16.
What type of PERFORM does not name a paragraph?
________________________________________________________________________
Answer:
17.
What is the value of NUM after the following is executed? _____________________
PERFORM 400-RTN VARYING COUNT FROM 1 BY 1 UNTIL NUM > 8.
Answer:
18.
How many times will 400-RTN be executed in the following example? ___________
PERFORM 400-RTN VARYING I FROM 1 BY 1 UNTIL I > 5
AFTER J FROM 1 BY 1 UNTIL J > 2.
Answer:
19.
What type of PERFORM has a scope terminator? ____________________________
Answer:
20.
What type of PERFORM requires the establishment of a counter? _______________
Answer:
21.
How many times will 400-RTN be executed in the following example? ___________
PERFORM 400-RTN VARYING I FROM 2 BY 3 UNTIL NUM > 9?
Answer:
22.
The simple PERFORM … END-PERFORM is an example which control structure?
________________________________________________________________________
Answer:
23.
The PERFORM UNTIL is an example of the control structure called_____________
Answer:
24.
Which one of the following is recommended code?
A.
PERFORM UNTIL COUNTER = 4
B.
PERFORM UNTIL COUNTER > 10
C.
PERFORM 300-PARA THRU 500-PARA
D.
GO TO 300-PROCESS-RTN
E.
EXIT
25.
Given: PERFORM 400-LABEL-RTN, which of the following is NOT true?
A.
This is an example of modularization.
B.
Every sentence will be executed within 400-LABEL-RTN.
C.
This is used for executing 400-LABEL-RTN from one or more points of a
program.
D.
400-LABEL-RTN will be executed exactly once.
E.
This is an example of an in-line PERFORM.
This is the end of the test. When you have completed all the questions and reviewed your answers, press the button below to grade the test.