Exam A00-212 All QuestionsBrowse all questions from this exam
Question 31

Given the following SAS program:

What will be the output from the PRINT Procedure?

    Correct Answer: A

    The SAS program defines a two-dimensional array 'Multi[1:2,2]' and partially initializes it with (1,2), which implies the array values are (1, 2, ., .). As the program iterates through the array, the 'OutValue' will be set to these values. Therefore, the PRINT procedure will output the 'OutValue' together with the indices 'i' and 'j'. The correct values will be 1 and 2 for the first row, 2 for the second, but since the array was not fully initialized, the rest will be missing ('.'), which matches Option A.

Discussion
mhminkovOption: A

answer is A, incl. warning message in the log: WARNING: Partial value initialization of the array multi. data work.lookup1; array multi [1:2,2] (1,2); do i = 1 to 2; do j = 1 to 2; OutValue = multi[i,j]; output work.lookup1; end; end; run; proc print data=work.lookup1 noobs; var i j OutValue; run;