Multiple choice technology programming languages

What is the output of the following sum statement? X1=9, X2=4, X3=1 Z=sum(of X1-X3);

  1. 8

  2. 10

  3. 14

  4. 12

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

The SUM function in SAS with the 'of' syntax sums a range of variables. SUM(of X1-X3) sums variables X1, X2, and X3. With X1=9, X2=4, X3=1, the sum is 9+4+1=14. The SUM function also handles missing values gracefully (treating them as 0). Option C is correct.