Question 64 :
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?
- amount word
5 DOG
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering SAS Certification Material
Correct Answer : 1
Exp : always "Dog" will be assigned to word as amount is hardcoded 7 in the begining of each iteration
and a value of 5 is saved in amount as it is hardcoded before the end of each output.
You can access to full explanation to question and answer from this page.