Multiple choice technology programming languages

The general form of SUM statement is

  1. variable = variable+expression;

  2. variable+expression;

  3. sum(expression,variable)

  4. expression=variable+expression;

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

The SAS SUM statement has the form 'variable+expression;' which accumulates values across observations. Unlike the SUM() function, it implicitly uses a RETAIN statement to preserve the variable's value and treats missing values as zero rather than propagating them. Options A and D show incorrect assignment syntax, while C describes a function call format.