Multiple choice technology programming languages

data work.clients; calls= 6; do while (calls le 6); calls+1; end; run; which one of the following is the value of the variable CALLS in the output data set

  1. 4

  2. 5

  3. 6

  4. 7

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

The DO WHILE loop evaluates the condition before each iteration. Initially calls=6, which satisfies 'calls le 6' (6 ≤ 6), so the loop executes and calls+1 makes it 7. The condition is rechecked: 7 ≤ 6 is false, so the loop terminates. The final value of calls is 7, not 4, 5, or 6.