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

The following SAS program is submitted:

What is the result?

    Correct Answer: C

    In SAS, when a numeric operation is attempted on a variable that is defined as a character, the value will be invalid for numeric operations. In the given program, 'Cost' is assigned the character value '$20,000'. When the SAS program attempts to calculate the value of 'Discount' as .10*Cost, it will fail because Cost is not recognized as a valid numeric value. This results in the value of 'Discount' being set to missing, and a note in the SAS log referring to invalid numeric data.

Discussion
mhminkovOption: C

given answer C is correct, .. if cost would have been defined as character, but a standard numeric value '20000', then answer B would have been correct.