Multiple choice technology programming languages

Following code is submitted. data temp: do i=1 to 3; do j=1 to 4; salary=salary+300; end; end; run; how many observations will present in the dataset TEMP?

  1. 1

  2. 3

  3. 2

  4. 0

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

This is a DATA step with nested DO loops, but there's no OUTPUT statement. By default, SAS DATA steps write only one observation at the end of the step, after all processing. The DO loops merely increment the SALARY variable multiple times (300 * 3 * 4 = 3600 added), but without explicit OUTPUT, only one record is written.