EZ Study

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

SAS Programing Certification Exam
Practice Questions & Answer set-26

### Practice Question 128

The following SAS program is submitted:
data work.sales;
do year = 1 to 5;
do month = 1 to 12;
x + 1;
end;
end;
run;
Which one of the following represents how many observations are written to the WORK.SALES data set?
A. 0   B. 1   C. 5   D. 60

Answer is B

### Practice Question 129

A raw data record is listed below:
--------10-------20-------30
1999/10/25
The following SAS program is submitted:
data projectduration;
infile 'file-specification';

input date \$ 1 - 10;

run;
Which one of the following statements completes the program above and computes the duration of the project in days as of today's
date?
A. duration = today( ) - put(date,ddmmyy10.);
B. duration = today( ) - put(date,yymmdd10.);
C. duration = today( ) - input(date,ddmmyy10.);
D. duration = today( ) - input(date,yymmdd10.);

Answer is D.

### Practice Question 130

A raw data record is listed below: (Question updated: underscores means blank spaces) --------10-------20-------30
Printing___750
The following SAS program is submitted:
data bonus;
infile 'file-specification';
Click to Get Those Highly Recommended SAS Programmers' Books
input dept \$ 1 - 11 number 13 - 15;

run;
Which one of the following SAS statements completes the program and results in a value of 'Printing750' for the DEPARTMENT
variable?
A. department = trim(dept) number;
B. department = dept input(number,3.);
C. department = trim(dept) || put(number,3.);
D. department = input(dept,11.) || input(number,3.);

Answer is C

### Practice Question 131

The following SAS program is submitted:
data work.month;
date = put('13mar2000'd,ddmmyy10.);
run;
Which one of the following represents the type and length of the variable DATE in the output data set?
A. numeric, 8 bytes
B. numeric, 10 bytes
C. character, 8 bytes
D. character, 10 bytes

Answer is D

### Practice Question 132

The following SAS program is submitted:
data work.month;
date = input('13mar2000',date9.);
run;
Which one of the following represents the type and length of the variable DATE in the output data set?
A. numeric, 8 bytes   B. numeric, 9 bytes
C. character, 8 bytes   D. character, 9 bytes

Answer is A.

Related links:

Continue to SAS Practice Exam Question Answer Set-27   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-25   SAS Tutorial   Statistics Tutorial