Multiple choice technology mainframe

Where in a PL/I program are you obliged to code a ; (semi colon) ? (3 answers)

  1. after each declaration of a variable

  2. at the end of each instruction

  3. to end a DO instruction

  4. at the end of the program

  5. to end an IF instruction

Reveal answer Fill a bubble to check yourself
B,D,E Correct answer
Explanation

In PL/I, semicolons terminate statements rather than acting as separators. Thus, a semicolon is required at the end of each statement (instruction), to terminate groups like DO, and to terminate the program block. However, the options listed are slightly confusing as a DO instruction ends with a separate END statement, which contains a semicolon, but 'at the end of each instruction', 'at the end of the program', and 'to end an IF instruction' (which is terminated by a semicolon) align with PL/I statement terminator rules.