Multiple choice technology programming languages

"following COBOL definitions and indicate when the statements are valid (True) or invalid (false): 05 LOCATION-CODE PIC 99. 88 NEW-YORK VALUE 10. 88 BOSTON VALUE 20. 88 DETROIT VALUE 30. 88 NORTH-EAST VALUE 10 20."

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
AI explanation

All the shown COBOL definitions are syntactically valid. LOCATION-CODE is a PIC 99 field, and each 88-level condition name (NEW-YORK, BOSTON, DETROIT, NORTH-EAST) correctly associates one or more values with it. COBOL allows multiple VALUEs in a level-88 clause to be separated by either commas or plain spaces, so 'VALUE 10 20' is equivalent to 'VALUE 10, 20' and is valid syntax — NORTH-EAST is true whenever LOCATION-CODE is 10 or 20.