Premium

Base SAS Certified Associate: Programming Fundamentals Using SAS Questions and Answers (Dumps and Practice Questions)



Question : You have been given below array declaration

array fee{4} fee1 fee2 fee3 fee4;

which of the following option correctly process all the variable declared in array ?

A. do i=1 to dim(fee);
B. do i=1 to dim(*);
C. do i=1,2,3,4;
D. do i=1 to 4;

 : You have been given below array declaration
1. A,B,C
2. B,C,D
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,B,D

Correct Answer : Get Lastest Questions and Answer :
Explanation: There are multiple ways by which you can reference all the variables in do loop. Once is by getting its size using dim
function. Next normal do loop start with index 1 and end with last index in this case 4. As well as you can use do i=1,2,3,4 all the indexes of array.




Question : You have similar variables in your dataset like sales of last months jan, feb, mar, apr, may, jun. And you wanted to do some
calculations on those variable referencing them through array, which of the following statement is correct with regards to array?

A. All newly created variable through array will be added in compilation stage of data step
B. Only numeric variables can be created through array declaration
C. Only character variables can be created through array declaration.
D. It is not mandatory to define all the variables explicitly while array declaration.

 : You have similar variables in your dataset like sales of last  months jan, feb, mar, apr, may, jun. And you wanted to do some
1. A,B
2. B,C
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,D
5. B,D

Correct Answer : Get Lastest Questions and Answer :
Explanation: You can create variables through array declaration of any of the either character or numeric type.

Yes, array variables are created during compilation phase only.
It is not mandatory to declare array variables which are used in your data, you can use _Numeric_ or _character_ to refer all the numeric or character
variables from the dataset.





Question : You have been given below data set and program



data course100 (drop=index);
set course101;
array existing{99:100} fee DURATION;
array new_values{99:100} nfee nduration;

do index=99 to 100;
put _all_;
new_values{index}=existing{index}+existing{index}*.10;
end;
run;

What is the value of nduration variable for course_id=104

 : You have been given below data set and program
1. 55

2. 88

3. Access Mostly Uused Products by 50000+ Subscribers

4. 77


Correct Answer : Get Lastest Questions and Answer :
Explanation: It seems a big program, but the question is asking what value will be assigned for a variable nduration for 4th observation. As
each ndirection value is 10 % additional of existing duration value. So the final answer will be 88.


Related Questions


Question :

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?

 :
1. 5
2. 15
3. Access Mostly Uused Products by 50000+ Subscribers
4. 25


Question :

The SAS data set named COMPANY.PRICES is listed below:
COMPANY.PRICES
prodid price producttype sales returns
K12S 5.10 NETWORK 15 2
B132S 2.34 HARDWARE 300 10
R18KY2 1.29 SOFTWARE 25 5
3KL8BY 6.37 HARDWARE 125 15
DY65DW 5.60 HARDWARE 45 5
DGTY23 4.55 HARDWARE 67 2
The following SAS program is submitted:
libname company 'SAS-data-library';
data hware inter soft;
set company.prices (keep = producttype price);
if price le 5.00;
if producttype = 'HARDWARE' then output HWARE;
else if producttype = 'NETWORK' then output INTER;
else if producttype = 'SOFTWARE' then output SOFT;
run;
How many observations does the HWARE data set contain?

 :
1. 0
2. 2
3. Access Mostly Uused Products by 50000+ Subscribers
4. 6


Question :

The following SAS program is submitted:
data allobs;
set sasdata.origin (firstobs = 75 obs = 499);
run;
The SAS data set SASDATA.ORIGIN contains 1000 observations.
How many observations does the ALLOBS data set contain?

 :
1. 424
2. 425
3. Access Mostly Uused Products by 50000+ Subscribers
4. 1000


Question : The following SAS program is submitted:
data _null_;
set old (keep = prod sales1 sales2);
file 'file-specification';
put sales1 sales2;
run;
Which one of the following default delimiters separates the fields in the raw data file created?

 : 	The following SAS program is submitted:
1. : (colon)
2. (space)
3. Access Mostly Uused Products by 50000+ Subscribers
4. ; (semicolon)


Question :

The contents of the raw data file TEAM are listed below:
--------10-------20-------30
Janice 10
Henri 11
Michael 11
Susan 12
The following SAS program is submitted:
data group;
infile 'team';
input name $15. age 2.;
file 'file-specification';
put name $15. +5 age 2.;
run;
Which one of the following describes the output created?


 :
1. a raw data file only
2. a SAS data set named GROUP only
3. Access Mostly Uused Products by 50000+ Subscribers
4. No output is generated as the program fails to execute due to errors.


Question :The contents of the SAS data set named PERM.STUDENTS are listed below:
name age
Alfred 14
Alice 13
Barbara 13
Carol 14
The following SAS program is submitted using the PERM.STUDENTS data set as input:
libname perm 'SAS-data-library';
data students;
set perm.students;
file 'file-specification';
put name $15. @5 age 2.;
run;
Which one of the following represents the values written to the output raw data file?
 :The contents of the SAS data set named PERM.STUDENTS are listed below:
1.
--------10-------20-------30
Alfred 14
Alice 13
Barbara 13
Carol 14
2.
--------10-------20-------30
Alfr14
Alic13
Barb13a
Caro14
3. Access Mostly Uused Products by 50000+ Subscribers
--------10-------20-------30
Alfr14ed
Alic13e
Barb13ara
Caro14l
4.
--------10-------20-------30
Alfred 14
Alice 13
Barbara 13
Carol 14