Multiple choice technology programming languages

Flat file structure is as below 1----5----10 dan 23 45 bob 44 50 sue 30 80 mam 40 50 The following code is submitted. data temp; infile ‘file specification’; input x $ 1-3; if x='sue' then input age 5-6; else input height 8-9; run; what would be the value of variable AGE in the dataset TEMP when variable X has the value ‘Sue’?

  1. 44

  2. 30

  3. 40

  4. 55

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

Without a trailing @ or @@ in the first input statement, the next input statement reads from the next line. Thus, when x is 'sue' (read from line 4), the subsequent input age statement reads from line 5 ('mam 40 50'), where columns 5-6 contain 40.