1. An imperative statement performs an operation only when an existing condition is true.
A.True
B.False


2. The following is a conditional statement:
   PERFORM 300-LABEL-RTN      
A.True
B.False


3. IF-THEN-ELSE statements are used to code conditional control structures.   
A.True
B.False


4. In an IF statement, a CONTINUE clause may be used with an ELSE clause.
A.True
B.False


5. Alphanumeric comparisons may vary in result from one computer to another.
A.True
B.False


6. Numeric comparisons may vary in result from one computer to another.   
A.True
B.False


7. The following conditions are equivalent:
   (1) A NOT > B      (2) A < = B   
A.True
B.False


8. The condition NOT NEGATIVE is equivalent to the condition POSITIVE.   
A.True
B.False


9. A condition-name is defined on level 66 in the DATA DIVISION.      
A.True
B.False


10. ASCII is an example of a commonly used internal code for representing alphanumeric data.   
A.True
B.False


11. In a compound conditional, the reserved word OR is used when all of several
conditions must be met in order for a statement to be executed.
A.True
B.False


12. A CLASS test will test if a field is POSITIVE, NEGATIVE or ZERO.
A.True
B.False


13. With DeMorgan's Rule, the condition NOT ( A = 5 AND B = 9 ) is equivalent to the
condition NOT A = 5 AND NOT B = 9
A.True
B.False


14. In COBOL what multiple selection structure is implemented with the verb EVALUATE? ___________________________________________________________

Answer:


15. CONTINUE is used within what statement where it acts as a place holder? ________

Answer:


16. What value is in Y after the following is executed? ___________________________
   IF 1 = 1 OR 5 > 8 AND 3 > 5
      MOVE 0 TO Y
   ELSE
      MOVE 1 TO Y
   END-IF

Answer:


17. Given the following:
   03   VEGETABLE    PIC 9.
      88   GREEN-BEANS   VALUE 1.
GREEN-BEANS is true when VEGETABLE has the value ________________________

Answer:


18. Write a single IF statement to PERFORM 500-RTN if NUM is between 5 and 8,
inclusive of the end points.__________________________________________________

Answer:


19. In a nested conditional it is recommended that each IF clause should be paired with an _____________________________________________________________________.

Answer:


20. Given the following sentence:
   IF A = 2
      IF B = 1
         PERFORM 300-RTN-1
      ELSE
         PERFORM 300-RTN-2
      END-IF
   ELSE
      IF B = 2
         PERFORM 300-RTN-3
      ELSE
         PERFORM 300-RTN-4
      END-IF
   END-IF
What routine is executed if A = 1 and B = 2? ___________________________________

Answer:


21. Given the statement:
   IF A = 1 AND B = 2 AND C = 3
      PERFORM 300-A-RTN
   ELSE
      PERFORM 300-B-RTN
   END-IF
When will 300-A-RTN be performed? ________________________________________

Answer:


22. Which of the following is NOT a reserved word?
A.NONE
B.OTHER
C.WHEN
D.AND
E.CONTINUE


23. Which of the following is NOT a legal scope terminator?
A.END-ADD
B.END-IF
C.END-MOVE
D.END-EVALUATE
E.END-PERFORM


24. Each of the following terms is valid in a COBOL IF-statement EXCEPT:
A.END-IF
B.ELSE
C.CONTINUE
D.OTHERWISE
E.THEN


25. Which of the following conditions is illegal in COBOL?
A.A > = 3
B.A < > 3
C.A = 3 OR 4
D.A IS LESS THAN 3
E.A NOT = 3



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.