Multiple choice technology mainframe

Which of the following statements about PL/I programs are TRUE? (2 answers)

  1. a program must always begin with a PROCEDURE statement and end with an END statement

  2. PL/I instructions can be coded between positions 1 and 72

  3. you have to declare each variable that you are going to use

  4. a program can be composed out of different procedures

  5. comment lines have to be preceded by //

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

PL/I programs must begin with a PROCEDURE statement and end with an END statement as structural requirements. The language supports modular programming by allowing programs to be composed of multiple procedures. Claims about column limits and mandatory variable declarations are incorrect, and PL/I uses /* */ for comments, not //.

AI explanation

Two things are true of PL/I programs: every program must begin with a PROCEDURE statement and end with an END statement (this is mandatory PL/I structure, defining the procedure block), and a program can be composed of multiple procedures (PL/I supports external and internal/nested procedures, allowing modular program construction). The other statements are false: PL/I source is traditionally free-format across columns but is not strictly limited to columns 1–72 the way older fixed-format languages are commonly described (and this detail is fixed-format/COBOL-like framing, not a defining PL/I rule tested this way); you do NOT have to declare every variable in PL/I — it supports implicit (contextual) declaration with default attributes, unlike languages requiring explicit declarations; and PL/I comments are delimited by /* ... */, not preceded by //, which is a JCL/C++ convention, not PL/I's.