Multiple choice technology programming languages

Which of the following array declarations is NOT correct ? (1) DCL ARRAY_1 DEC FIXED (3)(5,2); (2) DCL ARRAY_1 (5,2) DEC FIXED (3); (3) DCL ARRAY_1 (5) DEC FIXED (3), (2) DEC FIXED (3); (4) DCL (5,2) ARRAY_1 DEC FIXED (3);

  1. 1

  2. 2

  3. 3

  4. 4

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

Option 2 (DCL ARRAY_1 (5,2) DEC FIXED (3)) is NOT correct because PL/I requires the data type attributes to precede the dimension bounds. The correct form is either option 1 (type first, then bounds) or option 3 (bounds with separate type clauses). Option 4 is also invalid syntax.