A00-211 Exam QuestionsBrowse all questions from this exam

A00-211 Exam - Question 52


The following SAS program is submitted:

What is the result?

Show Answer
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

1 comment
Sign in to comment
mhminkovOption: C
Jun 4, 2021

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.