Multiple choice technology programming languages

data work.sales; do year=1 to 5; do month = 1 to 12; x + 1; end; end; run; which one of the following represents how many observations are written to the WORK.SALES dataset

  1. 0

  2. 1

  3. 5

  4. 60

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

This SAS DATA step contains nested DO loops (5 iterations × 12 iterations = 60 total) but no explicit OUTPUT statement. By default, SAS outputs one observation at the end of the DATA step. The variable x is incremented 60 times (x + 1 executes 60 times), but only one observation is written to WORK.SALES with the final x value of 60.