Question: Part C: (2 pts) For the READ statements shown below, assume the following declaration has been made and that the file input.dat has been opened

Part C: (2 pts) For the READ statements shown below, assume the following declaration has been made and that the file "input.dat" has been opened for reading on file unit 12: Integer, dimension (3,3) :: Array The file "input.dat" contains the following data on a single line: 1, 2, 3, 4, 5, 6, 7, 8, 9 For each READ statement, determine what value (if any) is assigned to each array element, or explain why an error results. 1. Read (12,:) Array 2. Read (12,*)((Array(i,j), j=1,3), i=1,3) 3. Read (12,)((Array(0.), i=1,3), j=1,3) 4. Read (12,) (Array(i,j), i=1,3), j=1,3) 5. Do j=1,3 Read(12,*) (Array(J), i = 1,3) End do You should draw a grid to indicate the assignments to Array which correspond to the output of the program linked above. For example, the grid below may be an answer to one of the questions. |2|3 Part C: (2 pts) For the READ statements shown below, assume the following declaration has been made and that the file "input.dat" has been opened for reading on file unit 12: Integer, dimension (3,3) :: Array The file "input.dat" contains the following data on a single line: 1, 2, 3, 4, 5, 6, 7, 8, 9 For each READ statement, determine what value (if any) is assigned to each array element, or explain why an error results. 1. Read (12,:) Array 2. Read (12,*)((Array(i,j), j=1,3), i=1,3) 3. Read (12,)((Array(0.), i=1,3), j=1,3) 4. Read (12,) (Array(i,j), i=1,3), j=1,3) 5. Do j=1,3 Read(12,*) (Array(J), i = 1,3) End do You should draw a grid to indicate the assignments to Array which correspond to the output of the program linked above. For example, the grid below may be an answer to one of the questions. |2|3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
