Multiple choice technology programming languages

data flower; Length x $ 5 y $ 11; input x y; datalines; daisyyellow ; run; What is the value of x and y in the output dataset?

  1. NO Observations

  2. x=daisy y=missing

  3. x = daisy y=daisyyellow

  4. x = daisy y=w

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

The input statement specifies that x has length 5 and y has length 11. The data line 'daisyyellow' is 11 characters long. SAS reads the first 5 characters for x (x='daisy'), then reads the next 11 characters for y. However, only 'yellow' (6 characters) remains after 'daisy', which is insufficient for y's length of 11. Since y cannot be satisfied and there's no more data, SAS creates NO Observations in the output dataset.