Multiple choice technology programming languages

data count; array x{3} (1,2,3); run; What is the result?

  1. No observations.No variables

  2. variable x is created with 3 observations with values 1,2 and 3

  3. Array should be given a name during initialization.Syntax Error

  4. The variables x1 , x2 and x3 are created with the values 1, 2 and 3

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

In SAS, defining an array x{3} with initial values (1,2,3) implicitly creates three variables named x1, x2, and x3 in the program data vector, assigning them the values 1, 2, and 3 respectively during execution of the DATA step.