Multiple choice technology programming languages

data temp; test = ‘X’; select(test); when(‘Y’) Name = ‘Ank’; when(‘X’) Name = ‘Ankur’; when(‘Z’) Name = ‘ ’; end; run; What is the output?

  1. Ank

  2. Ankur

  3. Missing

  4. 'Ankur'

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

The SAS code initializes test as 'X'. The select statement evaluates test, and the when('X') condition assigns the value 'Ankur' to the variable Name.