Multiple choice technology programming languages

The following SAS program is submitted: data work.test; array agent{4} $ 12 sales1 – sales4; run; Which one of the following represents the variables that are contained in the output data set?

  1. SALES1, SALES2, SALES3, SALES4

  2. AGENTS1, AGENTS2, AGENTS3, AGENTS4

  3. None, the DATA step fails because the ARRAY statement can reference only numeric data

  4. None

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

The ARRAY statement defines an array named 'agent' containing 4 character variables of length 7, which are SALES1 through SALES4 (indicated by sales1-sales4). The output dataset contains the original variables SALES1-SALES4, not variables named AGENT.