Multiple choice technology testing

Select ALL the valid COBOL data type declarations from the list below

  1. COMPUTATIONAL-3

  2. COMP

  3. COMP-2

  4. PACKED

  5. COMP-3

  6. COMP-1

Reveal answer Fill a bubble to check yourself
A,B,C,E,F Correct answer
Explanation

In COBOL, COMPUTATIONAL (or COMP) is the general category for binary data types. COMP-1 and COMP-2 are for floating-point numbers (single and double precision). COMP-3 (or COMPUTATIONAL-3) is for packed decimal data. PACKED by itself is not a valid COBOL data type declaration - you must use COMP-3 or PACKED-DECIMAL for packed decimal format.