0% (0 out of 14 correct) |
|
![]() | 1. |
One cause of a SIZE ERROR is division by zero.
![]() Level: easy |
![]() | 2. |
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.
![]() Level: hard |
![]() | 3. |
A size error will occur in the following statement if RESULT has PIC 9: DIVIDE 7 BY 3 GIVING RESULT
![]() Level: hard |
![]() | 4. |
The ON SIZE ERROR clause can be used with all arithmetic statements.
![]() Level: easy |
![]() | 5. |
The ROUNDED clause may not be used with a COMPUTE statement.
![]() Level: easy |
![]() | 6. |
The following is a correct COBOL statement: ADD AMOUNT TO 100
![]() Level: medium |
![]() | 7. |
TOTAL needs to have an initial value before the following statement is executed: ADD TICKET-PRICE SALES-TAX GIVING TOTAL
![]() Level: medium |
![]() | 8. |
In the following statement, TICKET-PRICE may be a report-item: ADD TICKET-PRICE SALES-TAX GIVING TOTAL
![]() Level: easy |
![]() | 9. |
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
![]() Level: medium |
![]() | 10. |
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: ![]() See page 261 Level: easy |
![]() | 11. | After the following two statements are executed, what value is in AMOUNT? MOVE 10 TO AMOUNT SUBTRACT 4 FROM AMOUNT GIVING TOTAL ________________________________________________________________________ YOUR ANSWER: ![]() See page 263 Level: easy |
![]() | 12. | After the following two statements are executed, what value is in AMOUNT? MOVE 10 TO AMOUNT SUBTRACT 4 FROM AMOUNT ________________________________________________________________________ YOUR ANSWER: ![]() See page 263 Level: easy |
![]() | 13. | What is the value in AMOUNT after the following statements are executed? MOVE 8 TO AMOUNT DIVIDE 2 INTO AMOUNT GIVING TOTAL ________________________________________________________________________ YOUR ANSWER: ![]() See page 265 Level: easy |
![]() | 14. | What is the value in AMOUNT after the following statements are executed? MOVE 8 TO AMOUNT DIVIDE 2 INTO AMOUNT ________________________________________________________________________ YOUR ANSWER: ![]() See page 265 Level: easy |
![]() | 15. | What is the value in AMOUNT after the following statement is executed? COMPUTE AMOUNT = 2 ** 3 + 6 / 3 - 2 ________________________________________________________________________ YOUR ANSWER: ![]() See page 278 Level: medium |
![]() | 16. | 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: ![]() See page 273 Level: medium |
![]() | 17. | Recode the following using a COMPUTE: ADD 1 TO Y. ________________________________________________________________________ YOUR ANSWER: ![]() See page 276 Level: medium |
![]() | 18. |
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: ![]() See page 285 Level: medium |
![]() | 19. | To store a 4 digit negative value in field AMOUNT, AMOUNT must have PIC_____ YOUR ANSWER: ![]() See page 280 Level: easy |
![]() | 20. |
All of the following are correct ADD statements in COBOL EXCEPT:
![]() Level: medium |
![]() | 21. |
Which of the following SUBTRACT statements is NOT correct?
![]() Level: medium |
![]() | 22. |
Which of the following MULTIPLY statements is NOT correct?
![]() Level: medium |
![]() | 23. |
Which of the following DIVIDE statements is NOT correct?
![]() Level: medium |
![]() | 24. |
Which operation is evaluated first in the following statement? COMPUTE Y = A * B + C ** D / E - F
![]() Level: easy |