Exam A00-211 All QuestionsBrowse all questions from this exam
Question 42

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?

    Correct Answer: C

    In the given SAS program, the variable 'cost' is assigned a character value ('20000') as it is enclosed in single quotes. When performing the multiplication operation (0.10 * cost), SAS will try to implicitly convert the character value to numeric. However, this will not succeed cleanly because character-to-numeric conversion issues often result in missing values unless explicitly formatted for conversion. As a result, the value for 'total' will be set to a missing numeric value (.).

Discussion
mhminkovOption: A

given answer A is correct, thanks to automatic conversion, s. Log: "NOTE: Character values have been converted to numeric values..."