Multiple choice technology

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

  1. a.) Ankur

  2. b.) Ank

  3. c.) Missing (character missing value)

  4. d.) ‘Ankur’

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

The DATA step assigns test = 'X'. The select statement evaluates test, and the when('X') branch executes, assigning the character string 'Ankur' to the variable Name.