Multiple choice technology mainframe

Suppose TOTAL-OUT has a PIC of X(5) and we code move '0' to TOTAL-OUT. What would be the content of TOTAL-OUT be at the end of the move?

  1. 0bbbb

  2. 00000

  3. bbbb0

  4. 00b00

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

In COBOL, moving data to an alphanumeric (X) field left-justifies the content and pads with spaces on the right. Moving '0' to X(5) gives '0 ' (0 followed by 4 spaces), represented as '0bbbb' where 'b' denotes blank space.