大家好,
我是个新手玩家。刚做完SAS 70题,有四道题想大家请教一下。我自己很抓狂。想不明白。
======================================
Question 32: Consider the follwing data step:
data WORK.NEW;
set WORK.OLD;
Count +1;
run;
The variable Count is created using a sum statement. Which statement regarding this variable is true?
A. It is assigned a value 0 when the data step begins execution.
B. It is assigned a value of missing when the data step begins execution.
C. It is assigned a value 0 at compile time.
D. It is assigned a value of missing at compile time.
答案是C 但是我不明白。如果这道题是C,那么53题呢?
======================================
Question 53: The following SAS program is submitted:
data WORK.TOTAL_SALARY;
retain Total;
set WORK.SALARY;
by Department;
if First.Department then Total =0;
Total = sum(Total, Wagerate);
if Last.Total;
Run;
What is the initial value of the variable Total?
A. 0
B. Missing
C. Thevalue of the first observation Wagerate
D. Cannot be determined from the information given.
Answer B. 我觉得这两道题很像,但不知道为什么答案不一样。
======================================
Question 63: The following SAS program is submitted:
data WORK.OUTDS;
do until(Prod GT 6);
Prod + 1;
end;
run;
What is the value of the variable Prod in the output data set?
A. . (missing)
B. 6
C. 7
D. Undetermined, infinite loop.
Answer C. 我运行程序也是7, 但do until 不是尾部判断吗?当Prod = 7 的时候,不是依然运行至尾部吗?答案不是8吗?我真的不懂了。请大家帮助。
======================================
Question 45 The following SAS program is submitted:
ods csvall file='c:\test.cvs';
proc print data = WORK.ONE;
var Name Score Grade;
by IDNumber;
run;
ods csvall close;
What is produced as output?
A. A file named test.cvs that can only be opened in Excel.
B. A text file named test.cvs that can be opened in Excel or inany text editor.
C. A text file named test.cvs that can only be opened in a text editor.
D. A file named test.cvs that can only be opened by SAS.
Answer C. 可是crackman网站上说这个答案是B。请大家帮我确认一下,应该是那个答案?
对不起, 一下子问了这么多问题。求高手解答。