By admin | September 28, 2009

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

6 comments | Add One

  1. admin - 09/28/2009 at 9:55 am

    C

  2. har - 02/1/2012 at 2:31 pm

    can you please explain it..?

  3. Sara Khan - 12/12/2012 at 8:56 am

    plzzz xplain hw D???

  4. Sara Khan - 12/12/2012 at 8:57 am

    oops sry i mean hw C????

  5. Karen - 02/26/2013 at 1:28 pm

    should it be 7?!

  6. hh - 02/19/2014 at 7:57 am

    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

Leave a Comment

Leave a Reply

Your email address will not be published.