Multiple choice technology programming languages

How much storage is occupied for COMP data items of 5 through 9 range

  1. 2

  2. 4

  3. 8

  4. 5

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

In COBOL, COMP (binary) data items with 5-9 digits occupy 4 bytes of storage (a fullword). The storage allocation follows binary word boundaries: 1-4 digits use 2 bytes (halfword), 5-9 digits use 4 bytes (fullword), and 10-18 digits use 8 bytes (doubleword).