Multiple choice technology mainframe

What can be the maximum number of digits declared in a variable?

  1. (A) 16

  2. (B) 17

  3. (C) 18

  4. (D) 19

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

COBOL's standard allows a maximum of 18 digits in a numeric variable declaration, such as PIC S9(18) or PIC 9(18). This limit is enforced by the language specification and most COBOL compilers.