EZ Study

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

SAS Programing Certification Exam
Practice Questions & Answer set-35

Practice Question 169

Which one of the following SAS procedures displays the data portion of a SAS data set?
A. PRINT     B. FSLIST     C. CONTENTS     D. DATASETS


Answer is A

Practice Question 170

The following SAS program is submitted:
proc datasets lib = sasuser;
Click to Get Those Highly Recommended SAS Programmers' Books
contents data = class varnum;
quit;
Which one of the following is the purpose of the VARNUM option?
A. to print a list of variable names
B. to print the total number of variables
C. to print a list of the variables in alphabetic order
D. to print a list of the variables in the order they were created


Answer is D

Practice Question 171

The following SAS program is submitted:
proc contents data = sasuser.airplanes;
run;
Which one of the following is produced as output?
A. the data portion of every data set in the SASUSER library
B. the data portion of the data set SASUSER.AIRPLANES only
C. the descriptor portion of every data set in the SASUSER library
D. the descriptor portion of the data set SASUSER.AIRPLANES only


Answer is D

Practice Question 172

A raw data file is listed below:
--------10-------20-------30
John McCloskey 35 71
June Rosesette 10 43
Tineke Jones 9 37
The following SAS program is submitted using the raw data file as input:
data work.homework;
infile 'file-specification';

input name $ age height;
if age LE 10;
run;
How many observations will the WORK.HOMEWORK data set contain?
A. 0     B. 2     C. 3
D. No data set is created as the program fails to execute due to errors.


The correct answer is C, not because if statement is not executed, but just because missing numeric values are smaller than all other numeric values. Inspite of the error msges, dataset is created wid 3 obs.

Practice Question 173

The SASDATA.BANKS data set has five observations when The following SAS program is submitted:
libname sasdata 'SAS-data-library';
data allobs;
set sasdata.banks;
capital=0;
do year = 2000 to 2020 by 5;
capital + ((capital+2000) * rate);
output;
end;
run;
How many observations will the ALLOBS data set contain?
A. 5     B. 15     C. 20     D. 25


Answer is D. because the output statement is inside the do loop, an observation will be created each time through the loop, so 5 observations, 5 loops, 25 observations total

Related links:

Continue to SAS Practice Exam Question Answer Set-36   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-34   SAS Tutorial   Statistics Tutorial