EZ Study

Actuarial Biology Chemistry Economics Calculators Confucius Engineer
Physics
C.S.

SAS Programing Certification Exam
Practice Questions & Answer set-34

Practice Question 163

The observations in the SAS data set WORK.TEST are ordered by the values of the variable SALARY.
The following SAS program is submitted:
proc sort data = work.test out = work.testsorted;

by name; run;
Which one of the following is the result of the SAS program?
A. The dataset WORK.TEST is stored ascending by values of NAME variable.
B. The dataset WORK.TEST is stored descending by values of NAME variable.
C. The dataset WORK.TESTSORTED is stored ascending by values of NAME variable.
D. The dataset WORK.TESTSORTED is stored descending by values of NAME variable.

Answer is C.

Practice Question 164

Which one of the following statements is true regarding the name of a SAS array?
A. It is saved with the data set.
B. It can be used in procedures.
C. It exists only for the duration of the DATA step.
D. It can be the same as the name of a variable in the data set.


Answer is C.

Practice Question 165

The following SAS program is submitted:
data stats;
set revenue;
array weekly{5} mon tue wed thu fri;...
Click to Get Those Highly Recommended SAS Programmers' Books

total = weekly{i} * .25;
output;   end;   run;
Which one of the following DO statements completes the program and processes the elements of the WEEKLY array?
A. do i = 1 to 5;
B. do weekly{i} = 1 to 5;
C. do i = mon tue wed thu fri;
D. A DO loop cannot be used because the variables referenced do not end in a digit.

Answer is A

Practice Question 166

The following SAS program is submitted:
data work.test;
array agents{4} $ 12 sales1 - sales4;
run;
Which one of the following represents the variables that are contained in the output data set?
A. SALES1, SALES2, SALES3, SALES4
B. AGENTS1, AGENTS2, AGENTS3, AGENTS4
C. None, the DATA step fails because the ARRAY statement can reference only numeric data.
D. None, the DATA step fails because the ARRAY statement can reference only pre-existing variables.

Answer is A

Practice Question 167

The following SAS program is submitted:
data work.test;
set work.staff (keep = jansales febsales marsales);
array diff_sales{3} difsales1 - difsales3;
array monthly{3} jansales febsales marsales;
run;
Which one of the following represents the new variables that are created?
A. JANSALES, FEBSALES and MARSALES
B. MONTHLY1, MONTHLY2 and MONTHLY3
C. DIFSALES1, DIFSALES2 and DIFSALES3
D. DIFF_SALES1, DIFF_SALES2 and DIFF_SALES3

Answer is C

Practice Question 168

On which portion(s) of a SAS data set does the PRINT procedure report?
A. the data portion only
B. the descriptor portion only
C. the descriptor portion and the data portion
D. neither the data portion nor the descriptor portion

Answer is A

Related links:

Continue to SAS Practice Exam Question Answer Set-35   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-33   SAS Tutorial   Statistics Tutorial