Multiple choice technology programming languages

01 ws-loop pic 9(02) value 0. Perform varying ws-loop from 1 by 1 until ws-loop = 100 Dispaly 'Have a good day' end-perform. How many times 'Have a good day' will be displayed

  1. 100

  2. 99

  3. 101

  4. None of the above

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

The loop variable ws-loop is defined with a picture clause of 9(02), meaning its maximum possible value is 99. When incremented beyond 99, it overflows back to 00. Consequently, the condition ws-loop = 100 can never be satisfied, resulting in an infinite loop instead of a finite display count.