Multiple choice technology programming languages

data temp; salary=.; if salary=. then salary=100; bonus=10; salary=.; total=sum(salary,bonus); run; What would be the value of TOTAL variable in the dataset TEMP?

  1. 100

  2. 110

  3. 10

  4. .

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

SALARY starts as missing (.), then gets set to 100, then BONUS=10. Then SALARY is reset to missing. The SUM() function in SAS ignores missing values - sum(salary,bonus) where salary=. and bonus=10 returns 10 (not missing). This is a key SAS behavior: SUM() treats missing as 0, unlike regular arithmetic.