SAS Certified Base Programmer 123 Questions (85)
The following SAS program is submitted:
data work.pieces; do while (n lt 6); n + 1; end; run;
Which one of the following is the value of the variable N in the output data set?
A. 4
B. 5
C. 6
D. 7
Topics:
SAS Base Questions |
6 Comments »
C
can you please explain it..?
plzzz xplain hw D???
oops sry i mean hw C????
should it be 7?!
This is because (n lt 6) not (n le 6). Do while statement executes only n is less than 6 so the max value is 5. So it follows that n + 1 = 5+1 =6