The following SAS program is submitted:
data work.new;
length word $7;
amount = 7;
if amount = 5 then word = 'CAT';
else if amount = 7 then word = 'DOG';
else word = 'NONE!!!';
amount = 5;
run;
Which one of the following represents the values of the AMOUNT and WORD variables?
A. amount word
5 DOG
B. amount word
5 CAT
C. amount word
7 DOG
D. amount word
7 ' ' (missing character value)
3 comments:
Answer: A
The last statement has no effect.
Agree with A. Though it might be more clear to say that because it comes after the processing of the variable word, amount = 5's only effect is to change the value of that one variable.
the answe is A.
Post a Comment