0% (0 out of 14 correct)
The questions marked with symbol have not been graded.
Responses to questions are indicated by the symbol.


WRONG1. One cause of a SIZE ERROR is division by zero.
C A. True
O B. False

See pages 270, 271
Level: easy



WRONG2. Following the rule-of-thumb to determine the size of the resulting field,
the PIC of RESULT should be 9(4) for the following:
   DIVIDE AMT1 BY AMT2 GIVING RESULT
where AMT1 has PIC 999 and AMT2 has PIC V9.
C A. True
O B. False

See page 273
Level: hard



WRONG3. A size error will occur in the following statement if RESULT has PIC 9:
DIVIDE 7 BY 3 GIVING RESULT
O A. True
C B. False

See page 270
Level: hard



WRONG4. The ON SIZE ERROR clause can be used with all arithmetic statements.
C A. True
O B. False

See page 270
Level: easy



WRONG5. The ROUNDED clause may not be used with a COMPUTE statement.   
O A. True
C B. False

See page 269
Level: easy



WRONG6. The following is a correct COBOL statement:
   ADD AMOUNT TO 100      
O A. True
C B. False

See page 260
Level: medium



WRONG7. TOTAL needs to have an initial value before the following statement is executed:
   ADD TICKET-PRICE SALES-TAX GIVING TOTAL   
O A. True
C B. False

See page 262
Level: medium



WRONG8. In the following statement, TICKET-PRICE may be a report-item:
   ADD TICKET-PRICE SALES-TAX GIVING TOTAL
O A. True
C B. False

See page 259
Level: easy



WRONG9. If NUM has PIC 9V9, after the following statements are executed, NUM will have the value 5.0:
   MOVE 1 TO NUM
   ADD 3.68 TO NUM ROUNDED
O A. True
C B. False

See page 269
Level: medium



TEXT10. If an input record has a value -68, what is an appropriate PIC clause for the corresponding field NUM in the input record description?
________________________________________________________________________

YOUR ANSWER:

The suggested answer is S9(2) SIGN IS LEADING SEPARATE CHARACTER


See page 261
Level: easy



TEXT11. After the following two statements are executed, what value is in AMOUNT?
   MOVE 10 TO AMOUNT
   SUBTRACT 4 FROM AMOUNT GIVING TOTAL ________________________________________________________________________

YOUR ANSWER:

The suggested answer is 10


See page 263
Level: easy



TEXT12. After the following two statements are executed, what value is in AMOUNT?
   MOVE 10 TO AMOUNT
   SUBTRACT 4 FROM AMOUNT ________________________________________________________________________

YOUR ANSWER:

The suggested answer is 6


See page 263
Level: easy



TEXT13. What is the value in AMOUNT after the following statements are executed?
   MOVE 8 TO AMOUNT
   DIVIDE 2 INTO AMOUNT GIVING TOTAL ________________________________________________________________________

YOUR ANSWER:

The suggested answer is 8


See page 265
Level: easy



TEXT14. What is the value in AMOUNT after the following statements are executed?
   MOVE 8 TO AMOUNT
   DIVIDE 2 INTO AMOUNT ________________________________________________________________________

YOUR ANSWER:

The suggested answer is 4


See page 265
Level: easy



TEXT15. What is the value in AMOUNT after the following statement is executed?
   COMPUTE AMOUNT = 2 ** 3 + 6 / 3 - 2
________________________________________________________________________

YOUR ANSWER:

The suggested answer is 8


See page 278
Level: medium



TEXT16. Following the rule-of-thumb to determine the size of the resulting field, what should the PIC of RESULT be for the following:
   ADD AMT1 AMT2 GIVING RESULT
where AMT1 has PIC 999 and AMT2 has PIC 999?______________________________

YOUR ANSWER:

The suggested answer is 9(4)


See page 273
Level: medium



TEXT17. Recode the following using a COMPUTE: ADD 1 TO Y.
________________________________________________________________________

YOUR ANSWER:

The suggested answer is COMPUTE Y = Y + 1


See page 276
Level: medium



TEXT18. To calculate the average of A, B, C, D and place the result in AVG, write the COBOL code using the verb COMPUTE and an intrinsic function:__________________

YOUR ANSWER:

The suggested answer is COMPUTE AVG = FUNCTION MEAN (A, B, C, D)


See page 285
Level: medium



TEXT19. To store a 4 digit negative value in field AMOUNT, AMOUNT must have PIC_____

YOUR ANSWER:

The suggested answer is S9(4)


See page 280
Level: easy



WRONG20. All of the following are correct ADD statements in COBOL EXCEPT:
O A. ADD 15 20 30 GIVING TOTAL
C B. ADD REGULAR-PAY TO 250
O C. ADD BONUS TO REGULAR-PAY GIVING TOTAL-PAY
O D. ADD 15 TO AMOUNT
O E. ADD AMOUNT1 TO 30 GIVING AMOUNT2

See page 260
Level: medium



WRONG21. Which of the following SUBTRACT statements is NOT correct?
O A. SUBTRACT NUM1 NUM2 FROM NUM3
O B. SUBTRACT NUM1 NUM2 NUM3 FROM AMOUNT1 AMOUNT2
O C. SUBTRACT NUM1 FROM 10 GIVING NUM2
C D. SUBTRACT NUM FROM 25
O E. SUBTRACT NUM1 FROM NUM2

See pages 262, 263
Level: medium



WRONG22. Which of the following MULTIPLY statements is NOT correct?
O A. MULTIPLY NUM1 BY 5 GIVING RESULT
O B. MULTIPLY 5 BY NUM
C C. MULTIPLY NUM1 BY NUM2 BY NUM3 GIVING RESULT
O D. MULTIPLY 5 BY 10 GIVING RESULT
O E. MULTIPLY NUM1 BY NUM2

See page 265
Level: medium



WRONG23. Which of the following DIVIDE statements is NOT correct?
C A. DIVIDE NUM1 BY NUM2
O B. DIVIDE NUM1 INTO 10 GIVING RESULT
O C. DIVIDE NUM1 BY NUM2 GIVING TOTAL
O D. DIVIDE NUM1 INTO NUM2 GIVING TOTAL
O E. DIVIDE NUM1 INTO NUM2

See page 265
Level: medium



WRONG24. Which operation is evaluated first in the following statement?
COMPUTE Y = A * B + C ** D / E - F
O A. A * B
O B. B + C
C C. C ** D
O D. D / E
O E. E – F

See page 278
Level: easy




Retake Test