SAS Programming Quiz | Latest SAS Quiz

SAS Programming Quiz

This SAS Programming Quiz is for freshers and experienced persons in SAS Programming. SAS Programming Quiz has multiple-choice questions (MCQs), which gives you complete knowledge of this language. This SAS practice test contains the right answers to each question, refer the link below of each question to explore your knowledge in this field. SAS Programming Quiz contains some tricky SAS interview questions, which will help you for prepare for SAS interview.
Still, if you are not confident about this SAS Programming Quiz, refer to our article, SAS Programming Language. It will clear your queries.

You may also refer to SAS Online Quiz Part – I to check your knowledge.

SAS Programming Quiz | Latest SAS Quiz

SAS Programming Quiz | Latest SAS Quiz

Best Of Luck!! for SAS Programming Quiz

Q1. What is the name of the input data set in the program below?
data work.us;
set orion.sales;
where Country='US';
run;

Correct! Wrong!

Q2. What is the name of the output data set in the program below?
data work.us;
set orion.sales;
where Country='US';
run;

Correct! Wrong!

Q3. In SAS, one can test single or joint hypothesis after successful completion of

Correct! Wrong!

Q4. 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;

Correct! Wrong!

Q5. 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;

Correct! Wrong!

Q6. 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?

Correct! Wrong!

Q7. Which procedure can be used to view the permanent labels and formats stored in a data set?

Correct! Wrong!

Q8. Which of the following SAS functions returns a number from 1 to 12?

Correct! Wrong!

Q9. 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;

Correct! Wrong!

Q10. Which DATA step ensures that all observations are assigned a non-missing value for Bonus?

Correct! Wrong!

Q11. Which of the following determines the length of a new variable at compile time?

Correct! Wrong!

Q12. We use a DO group in a DATA step when you want to execute multiple statements for a true IF-THEN expression

Correct! Wrong!

Q13. Which of the following statements is true about merging SAS data sets by using the DATA step?

Correct! Wrong!

Q14. Which of the following programs concatenates the data sets sales and products, in that order?

Correct! Wrong!

Q15. 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;

Correct! Wrong!

Q16. 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;

Correct! Wrong!

Q17. Which of the following is a valid name for a character format?

Correct! Wrong!

Q18. 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?

Correct! Wrong!

Q19. What value will be assigned to Units?
data work.comp;
set work.sales;
Units=Total+Bonus/Quantity;
run;
PDV

What will be the value assigned to units
Correct! Wrong!

Q20. 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;

value of benefit for the observation
Correct! Wrong!

Hope you all had fun solving this SAS Programming Quiz. Stay tuned for more and for any doubts post them in the comments section below.

Refer our SAS/STAT Tutorials

13 Responses

  1. Animesh Anand says:

    Really good questions.

    • DataFlair Team says:

      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

  2. Vishal says:

    Great….. Very helpful

    • DataFlair Team says:

      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

  3. Dayakar G says:

    I should appreciate the types of question. I attempt different test. but I like the way of questioning. Thanks Data Flair

    • DataFlair Team says:

      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

  4. MP says:

    Please, explain why answers C and 19 are correct for Q.# 18 & 19 resp.

  5. elena says:

    Q19 provides the wrong (right) answer. Division in math goes first. The right answer is 145.

  6. Navika says:

    Can we have some more quiz ques on sas…it will be very helpful.

  7. Sasikanth reddy says:

    Very useful Questions. Thanks for sharing.

  8. Ujwala Nandini Kathula says:

    very helpful ,can we have some more advanced quiz questions.
    and my suggestion is to better add description of anwers.

  9. Siva says:

    Data a;
    Office =’stansys’;
    Run;

    Enduser wants output is
    StAnSyS

  10. shyam says:

    Good practice.Thanks for given a option to memorize.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.