Question 4 :
The following SAS program is submitted:
data work.clients;
calls = 6;
do while (calls le 6);
calls + 1;
end;
run;
Which one of the following is the value of the variable CALLS in the output data set?
- 4
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering SAS Certification Material
Ans : 4
Exp : Please note the difference between do while and do until:
DO WHILE
The while test is evaluated at the top of the loop.
DO UNTIL
The until test is evaluated at the bottom of the loop.
DO WHILE (evaluates at the top of the loop) Now, calls=6 is equal to 6 therefore calls le 6 is TRUE. DO LOOP is executed. So, calls = calls +1 = 7
You can access to full explanation to question and answer from this page.