Multiple choice technology programming languages

How many bytes does a S9(7) COMP-3 field occupy ?

  1. 4

  2. 3

  3. 2

  4. None of the above

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

A COMP-3 (packed decimal) field stores two digits per byte, plus one sign nibble in the last byte. The formula for the byte size is (N + 1) / 2 rounded up. For S9(7), the number of digits N is 7. Thus, (7 + 1) / 2 = 4 bytes. Other options are incorrect mathematical derivations.