Base SAS Certification Questions Series - Part 6

The Global SAS certification exam is administered by SAS and Pearson VUE together. There are 60-65 multiple choice questions in Base SAS certification exam and candidate must achieve 70% score to pass multiple choice questions in  110 minutes.


We had started a series of articles to help you prepare for this examination. Here comes the sixth one covering few more.



Question 16 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 of the question is highlighted.

Explanation:
A SAS array is a temporary grouping of SAS variables under a single name.
Thus, an array exists only for the duration of the DATA step.
One reason for using an array is to reduce the number of statements that are required for processing variables.


*********************************************************************************

Question 17 : The following SAS program is submitted:


data 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 of the question is highlighted.

Explanation:
Here, Four variables will be created with names SALES1, SALES2, SALES3 and SALES4
under the single array AGENTS. This array exists only for the duration of the DATA step and
thus not be available in the dataset after opening.

*********************************************************************************

Question 18 : The following SAS program is submitted :


data test;
array agents{4} $12 sales1 - sales4;
do i = 1 to 4;
agents(1) = 1;
agents(2) = 2;
agents(3) = 3;
agents(4) = 4;
output;
end;
drop i;
run;
proc print;run;

How many variables and observations will be created?
A. 4  Variables and 12 Observations
B. 4  Variables and 4 Observations
C. 12 Variables and 4 Observations
D. 12 Variables and 12 Observations

Answer of the question is highlighted.

Explanation:
Here, Four variables will be created with names SALES1, SALES2, SALES3 and SALES4
with a length of 12character each. There will be 4 observations in data-sets.


Enjoy reading our other articles and stay tuned with ...

Kindly do provide your feedback in the 'Comments' Section and share as much as possible.

No comments:

Post a Comment

Do provide us your feedback, it would help us serve your better.