How many bytes will a S9(8) COMP field occupy ?

  1. 9

  2. 4

  3. 8

  4. 5


Correct Option: B

AI Explanation

To answer this question, we need to understand the concept of the COMP field in COBOL.

In COBOL, the COMP field is used to represent numeric data. It is stored in binary format, which means that each digit is represented by a binary byte.

The S9(8) COMP field is defined as a signed numeric field with a length of 8 digits. The "S9" part indicates that it is a signed field, and the "(8)" part indicates the length.

Since each digit is represented by a binary byte, the S9(8) COMP field will occupy 8 bytes.

Therefore, the correct answer is B) 4.

Find more quizzes: