楼主: hailingkatherin
1320 3

一个关于array的小问题 [推广有奖]

  • 0关注
  • 0粉丝

硕士生

82%

还不是VIP/贵宾

-

威望
0
论坛币
277 个
通用积分
0
学术水平
1 点
热心指数
5 点
信用等级
1 点
经验
164 点
帖子
126
精华
0
在线时间
87 小时
注册时间
2015-1-18
最后登录
2016-5-15

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

93. This question will ask you to provide a line of missing code.
Given the following data set WORK.SALES:
SalesID SalesJan FebSales MarchAmt
------- -------- -------- --------
W6790 50 400 350
W7693 25 100 125
W1387 . 300 250
The following SAS program is submitted:
data WORK.QTR1;
set WORK.SALES;
array month{3} SalesJan FebSales MarchAmt;
<insert code here>
run;
Which statement should be inserted to produce the following output?
SalesID SalesJan FebSales MarchAmt Qtr1
------- -------- -------- -------- ----
W6790 50 400 350 800
W7693 25 100 125  250
W1387 . 300 250 550
A.Qtr1 = sum(of month{_ALL_});
B. Qtr1 = month{1} + month{2} + month{3};
C. Qtr1 = sum(of month{*});
D.Qtr1 = sum(of month{3});
Answer: C

请问下大家,为什么用C不用D? 我选的D。
谢谢大家!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:array ARR Ray 小问题 following following question produce provide should

已有 1 人评分热心指数 收起 理由
eijuhz + 2 精彩帖子

总评分: 热心指数 + 2   查看全部评分

沙发
goldbaodi 发表于 2015-2-27 00:04:56 |只看作者 |坛友微信交流群
outside of ARRAY statement, month{3} is temp var which always refers to the 3rd var (i.e. "MarchAmt" here). So, D is not right answer.

使用道具

藤椅
hailingkatherin 发表于 2015-2-27 09:08:54 |只看作者 |坛友微信交流群
goldbaodi 发表于 2015-2-27 00:04
outside of ARRAY statement, month{3} is temp var which always refers to the 3rd var (i.e. "MarchAmt" ...
谢谢!明白了!

使用道具

板凳
boxiliya 发表于 2018-3-17 20:52:18 |只看作者 |坛友微信交流群
求问,为什么A选项不对呢?

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-20 12:14