Flat file structure is as below 1----5----10 $1,120 The following code is submitted. data temp; infile ‘file specification’; input salary 5; run; What would be the value of SALARY in the dataset TEMP

  1. blank value

  2. $1,120

  3. 2

  4. .


Correct Option: C

AI Explanation

To answer this question, let's understand the code and its impact on the dataset.

The given code is reading data from a file specified in the "infile" statement and creating a dataset named "temp". The "input" statement is used to define the variables and their lengths to be read from the file. In this case, "salary" is defined with a length of 5.

Based on the given flat file structure, the value "1,120" is located at positions 1 to 5. Since "salary" is defined with a length of 5, it will read the value "1,120" from the file.

Therefore, the value of SALARY in the dataset TEMP would be 2.

So, the correct answer is Option C: 2.

Find more quizzes: