SAS Base Programming for SAS 9 — Question 31

The following SAS program is submitted:
data work.retail;
cost = '20000';
total = .10 * cost;
run;
Which one of the following is the value of the variable TOTAL in the output data set?

Answer options

Correct answer: A

Explanation

The variable COST is assigned as a character string, but when multiplied by a numeric value (0.10), SAS treats it as a numeric value, resulting in TOTAL being calculated as 2000. Options B, C, and D are incorrect because they either represent a string or indicate missing values, which do not reflect the actual numeric computation performed.