Premium

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



Question : You have been given below code
if course_fee>=4000
and (COURSE_NAME='HADOOP' or (COURSE_NAME='SPARK' and STUDENTS=24))
then LOCATION='MUMBAI';

Which of the expression will be executed first?

 : You have been given below code
1. if course_fee>=4000

2. (COURSE_NAME='SPARK' and STUDENTS=24)

3. Access Mostly Uused Products by 50000+ Subscribers

4. Can not be predicted and will be optimized by SAS engine


Correct Answer : Get Lastest Questions and Answer :
Explanation: Always expression in parenthesis will be executed first.




Question : You have been given below values in a variable name TotalFee
5000
.
7000
Once you execute below statement, what would be the ENTIREFEE values at end of execution
ENTIREFEE+TotalFee

 : You have been given below values in a variable name TotalFee
1. Missing

2. Null

3. Access Mostly Uused Products by 50000+ Subscribers

4. 22000

5. 22


Correct Answer : Get Lastest Questions and Answer :
Explanation: ENTIREFEE here works as an accumulator. Hence, all the values will be add up. Missing value will be ignored. Hence, it will not
impact the total some. So final value for ENTIREFEE will be 22000




Question : You have been given below values in a variable name TotalFee
5000
.
7000
Once you execute below statement, what would be the ENTIREFEE values at end of execution
RETAIN ENTIREFEE 5000;
ENTIREFEE+TotalFee;

When you are at the 4th observation than what would be the value of ENTIREFEE

 : You have been given below values in a variable name TotalFee
1. 0

2. Null

3. Access Mostly Uused Products by 50000+ Subscribers

4. 22000

5. 17000


Correct Answer : Get Lastest Questions and Answer :
Explanation: Retain will help you to initialize the value. Here, ENTIREFEE will have initial value as 5000. Then will be added up . Hence
upto 4th observation value will be
5000+4000+5000+3000=17000



Related Questions


Question : You have been given below dataset and program

filename course81 '/folders/myfolders/hedata/course81.txt';

data data81;
infile course81 ;
retain course_name;
input header $ @;
if header='C' then input course_name $;
if header='LF';
input location $ Fee ;
run;

What value it will have in 10th record

 : You have been given below dataset and program
1. SAS LF MUMBAI 4999

2. HADOOP LF MUMBAI 4999

3. Access Mostly Uused Products by 50000+ Subscribers

4. SCALA LF MUMBAI 4999



Question :
You have been given blow dataset and program

filename course81 '/folders/myfolders/hedata/course81.txt';

data data81 (drop=header);
infile course81;
retain course_name;
input header $ @;

if header='C' then
do;

if _N_ >1 then
output;
TOTAL_LOCATIONS=0;
input course_name $;
end;
else if header='LF' then
TOTAL_LOCATIONS+1;
run;

proc print data=data81;
run;

What value the 5th observation will hold?

 :
1. SAS 4

2. HADOOP 4

3. Access Mostly Uused Products by 50000+ Subscribers

4. PYTHON 4

5. None of the above



Question : By looking at the dataset, can you determine which is a correct statement where it finds that as soon as header is C , all the detail
record should be processed?



 : By looking at the dataset, can you determine which is a correct statement where it finds that as soon as header is C , all the detail
1. if header='C' do;

2. if header=C then do;

3. Access Mostly Uused Products by 50000+ Subscribers

4. if header='C' then do;



Question : You have been given below program

filename course81 '/folders/myfolders/hedata/course81.txt';

data data81 (drop=header);
infile course81 end=last;;
retain course_name;
input header $ @;

if header='C' then
do;

if _N_ >1 then
output;
TOTAL_LOCATIONS=0;
input course_name $;
end;
else if header='LF' then
TOTAL_LOCATIONS+1;
if last then output;
run;

what does here last variable used for?

A. It will always have value as 1, as soon as file read reach end of the record its value will be set to 0.
B. It will always have value as 0, as soon as file read reach end of the record its value will be set to 1
C. For each iteration its value will be written in output as well.
D. Value of last variable will never be written to output

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


Question : You have been given program and dataset



filename course81 '/folders/myfolders/hedata/course81.txt';

data data81 (drop=header);
infile course81 end=last;;
retain course_name;
input header $ @;

if header='C' then
do;

if _N_ >1 then
output;
TOTAL_LOCATIONS=0;
input course_name $;
end;
else if header='LF' then
TOTAL_LOCATIONS+1;
if last then output;
run;



What happened when this program will be executed ?

 : You have been given program and dataset
1. It will generate 3 observation in output

2. It will generate 4 observation in output

3. Access Mostly Uused Products by 50000+ Subscribers

4. It will generate 22 observation in output