星期四要考试了, 还有3道123的题没明白. 请大家帮帮忙. 希望真像大家说的大部分题都是123的. 等考完在向大家汇报吧.
1. The following SAS program is submitted:
data work.staff;
jobcategory= ‘FA’;
joblevel= ‘1’;
jobcategory=jobcategory !! joblevel;
run;
which one of the following is he value of he variable jobcategory in the output data set?
A. FA
B. FA1
C. FA 1
D.‘’ missing character value
答案是A 为什么不是B 或C呢?
2. the following SAS program is submitted:
data work. Test;
First=' Ipswich, England';
City= substr(First, 1, 7);
City_Country=City !! ‘, ’!! ‘England’;
Run;
Which one of the following is the value of the variable CITY_COUNTRY in the output data set?
A. Ipswich, England
B. Ipswich , England
Answer is B. 为什么不是A?
3. The following SAS program is submitted:
data test;
input animal1 $ animal2 $ mlgrams1 mlgrams2;
cards;
hummingbird ostrich 54000.39 90800000.87;
run;
Which one of the following represents the values of each variable in the output data set?
A. animal1 animal2 mlgrams1 mlgrams2
hummingb ostrich 54000.39 90800000
B. animal1 animal2 mlgrams1 mlgrams2hummingb ostrich 54000.39 90800000.87
答案是B. 可我觉得应该是A. 因为the default storage length for a variable is 8. 所以 hummingbird被截去最后的3位.按照这个道理90800000.87也超过了8,所以也应该截去最后的3位. 真是把我搞糊涂了.
先谢谢大家了.