For the following PL/I program, a) Explain how a condition known as 'SUBSCRIPTRANGE CONDI TION' arises. b) Show what will be printed out if the program is run. c) Write out a corrected program to...


For the following PL/I program,<br>a) Explain how a condition known as 'SUBSCRIPTRANGE<br>CONDI TION' arises.<br>b) Show what will be printed out if the program is run.<br>c) Write out a corrected program to avoid errors due to this<br>condition.<br>d) Show what the corrected program will print out.<br>EXAMPLE: PROC OPTIONS (MAIN):<br>DCL A (5) FIXED (3).(X,YZ) FIXED(2):<br>GET LIST(Z);<br>DO I=1 TO Z:<br>GET LIST(X,Y);:<br>A(I) = X*Y;<br>PUT LIST(I,A(I):<br>END:<br>END PROGRAM;<br>Data: 6, 10, 10, 5, 3, 20, 40, 30, 30, 7, 8, 15, 2.<br>

Extracted text: For the following PL/I program, a) Explain how a condition known as 'SUBSCRIPTRANGE CONDI TION' arises. b) Show what will be printed out if the program is run. c) Write out a corrected program to avoid errors due to this condition. d) Show what the corrected program will print out. EXAMPLE: PROC OPTIONS (MAIN): DCL A (5) FIXED (3).(X,YZ) FIXED(2): GET LIST(Z); DO I=1 TO Z: GET LIST(X,Y);: A(I) = X*Y; PUT LIST(I,A(I): END: END PROGRAM; Data: 6, 10, 10, 5, 3, 20, 40, 30, 30, 7, 8, 15, 2.

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here