SAS Programming Quiz | Latest SAS Quiz
Interactive Online Courses: Elevate Skills & Succeed Enroll Now!
This SAS Programming Quiz has multiple-choice questions (MCQs), which gives you complete knowledge of this language.
Do not miss to attempt the other part of the SAS Quiz as well once you are done with this part:
Quiz Summary
0 of 20 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 20 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
- Question 1 of 20
1. Question
What is the name of the input data set in the program below?
data work.us;
set orion.sales;
where Country=’US’;
run;CorrectIncorrect - Question 2 of 20
2. Question
What is the name of the output data set in the program below?
data work.us;
set orion.sales;
where Country=’US’;
run;CorrectIncorrect - Question 3 of 20
3. Question
In SAS, one can test single or joint hypothesis after successful completion of
CorrectIncorrect - Question 4 of 20
4. Question
The data set orion.sales contains nine variables. Given this DATA step, how many variables does the descriptor portion of work.comp contain?
data work.comp;
set orion.sales;
drop Gender Salary Birth_Date;
run;CorrectIncorrect - Question 5 of 20
5. Question
The data set orion.sales contains nine variables. Given this DATA step, how many variables does the descriptor portion of work.comp contain?
data work.comp;
set orion.sales;
keep Employee_ID Gender Job_Title Salary;
run;CorrectIncorrect - Question 6 of 20
6. Question
A KEEP statement in a DATA step omits all variables except Name, Color, and Price from the output data set. Are the omitted variables included in the PDV?
CorrectIncorrect - Question 7 of 20
7. Question
Which procedure can be used to view the permanent labels and formats stored in a data set?
CorrectIncorrect - Question 8 of 20
8. Question
Which of the following SAS functions returns a number from 1 to 12?
CorrectIncorrect - Question 9 of 20
9. Question
The data set orion.sales contains nine variables. Given this DATA step, how many variables does the descriptor portion of work.comp contain?
date work.comp;
set orion.sales;
drop Gender Salary Country;
Compensation=sum(Salary,Bonus);
run;CorrectIncorrect - Question 10 of 20
10. Question
Which DATA step ensures that all observations are assigned a non-missing value for Bonus?
CorrectIncorrect - Question 11 of 20
11. Question
Which of the following determines the length of a new variable at compile time?
CorrectIncorrect - Question 12 of 20
12. Question
We use a DO group in a DATA step when you want to execute multiple statements for a true IF-THEN expression
CorrectIncorrect - Question 13 of 20
13. Question
Which of the following statements is true about merging SAS data sets by using the DATA step?
CorrectIncorrect - Question 14 of 20
14. Question
Which of the following programs concatenates the data sets sales and products, in that order?
CorrectIncorrect - Question 15 of 20
15. Question
What is the syntax error in this DATA step?
data returns_qtr1;
set returns_jan(rename=(ID=CustID) (Return=Item))
returns_feb(rename=(Dt=Date))
returns_mar;CorrectIncorrect - Question 16 of 20
16. Question
If you run this DATA step, what observations does the dataset bonuses contain?
data bonuses;
merge managers (in=M)
staff (in=S);
by EmpID;
if M=0 and S=1;
run;CorrectIncorrect - Question 17 of 20
17. Question
Which of the following is a valid name for a character format?
CorrectIncorrect - Question 18 of 20
18. Question
Which of the following DATA steps correctly reads the permanent dataset salesinfo from the sporting library and creates a new data set named salesinfo2 in the same library?
CorrectIncorrect - Question 19 of 20
19. Question
What value will be assigned to Units?
data work.comp;
set work.sales;
Units=Total+Bonus/Quantity;
run;
PDVCorrectIncorrect - Question 20 of 20
20. Question
In the program below, what is the value of benefit for the observation shown?
data work.total;
set payroll.june;
Benefit=sum(Ins,Health_Award);
run;CorrectIncorrect
Hope, you liked the set of questions in this SAS Quiz.
If you have any queries and suggestions, post them in the comment box.
Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google
Really good questions.
Hi Animesh,
Thanks for commenting and appreciating our SAS Programming Quiz. All the questions gathered to test your knowledge. We have a nice set of SAS Interview questions and answers, you can check them as well.
Regards,
DataFlair
Great….. Very helpful
Thanks, Vishal for such nice words for this SAS Quiz. We have more SAS Programming Quizzes please refer them too.
Surely, they will help you!
Regards,
DataFlair
I should appreciate the types of question. I attempt different test. but I like the way of questioning. Thanks Data Flair
Hi Dayakar,
Thanks for appreciating our SAS Programming Quiz. The quiz is specially designed by experts for our audience. We hope, you are sharing this SAS Quiz with your peer groups.
Keep Visiting DataFlair
Please, explain why answers C and 19 are correct for Q.# 18 & 19 resp.
Q19 provides the wrong (right) answer. Division in math goes first. The right answer is 145.
yes I was wondering too
yes I was wondering too
Can we have some more quiz ques on sas…it will be very helpful.
Very useful Questions. Thanks for sharing.
very helpful ,can we have some more advanced quiz questions.
and my suggestion is to better add description of anwers.
Data a;
Office =’stansys’;
Run;
Enduser wants output is
StAnSyS
Good practice.Thanks for given a option to memorize.
Improve the technical skills and predict analysis of the output results its very good improve the technical skills where u will improve the skills after written quiz exam it will help peoples but i requesting please create the quiz in macros concepts it will helps all the peoples.
Thanks you Sir,
Have Nice day
Can I improve my skils
Very Good questions asked in quiz but I have some doubts here
1. In Que-17, why $country is not correct answer?
2. In Que-19, is there wrong value given for variable Total(140 instead of 14)
This practice was very helpful
The answer for question no. 19 will be 145 and there is no such option whereas option a i.e 19 is marked as an answer.
Great effort there! Good job.
I wish I could practice this often.
Do you also have questions on code writing for SAS Base Cert.?
Kudos.
Tranwrd function can do this
Thank you very much for creating the quiz.
Can you please check 14th question please. ‘Date’ is given instead of ‘data’, so it is ‘None of the above’ I think? Plz correct me if I’m wrong.
THANK YOU FOR CREATING A QUIZ.
CAN YOU PLZ CHECK 18 QUESTION. IN QUESTION SALESINFO WAS MENTIONED BUT IN OPTION ‘C’
MENTIONED SALES SO COREECT OPTION IS” NONE OF THE ABOVE”PLZ CORRECT ME IF I AM WRONG
Dear admin, Thank you so much for your efforts, i have refreshed my self in Base SAS.
can you please look into below question, you need to update the answer for below question.
14. Question
Which of the following programs concatenates the data sets sales and products, in that order?
answer:
date newsales; set sales products; run; (WRONG)
data newsales; set sales products; run; (RIGHT)
For Q18, you stated that the correct answer is: “data sporting.salesinfo2: set sporting.sales run;” This cannot be the correct answer. The correct answer will be ” data sporting.salesinfo2: set sporting.salesinfo run;” which is not one of the options. So for the choices provided, none of the above will be the correct answer.