Multiple choice technology programming languages

"What do you think the output of the following code snippet will be? 01 WS-NUM-TEST PIC +9(2).99. 01 WS-NUM-TEST2 PIC -9(2).99. MOVE 19.99 TO WS-NUM-TEST MOVE -9.99 TO WS-NUM-TEST2 IF WS-NUM-TEST > WS-NUM-TEST2 DISPLAY ""+VE GREATER THAN -VE"" ELSE DISPLAY ""+VE LESS THAN -VE"" END-IF "

  1. +VE GREATER THAN -VE

  2. +VE LESS THAN -VE

  3. Compile error

  4. Edited Numeric field cannot be used for comparison.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The code will produce a compilation error. The PIC clauses PIC +9(2).99 and PIC -9(2).99 are invalid COBOL syntax. In COBOL, to define signed numeric fields, you use 'S' as a separate sign clause prefix (e.g., PIC S9(2).99), not + or - symbols embedded in the PIC clause. The + and - symbols are used in editing (output formatting), not in data definition clauses.