Multiple choice technology programming languages

"What will be the output of the following snippet: MOVE ZERO TO WS-COUNT IF WS-COUNT = 0 CONTINUE END-IF ADD +1 TO WS-COUNT. DISPLAY 'VALUE OF WS-COUNT: ' WS-COUNT "

  1. VALUE OF WS-COUNT: 0

  2. VALUE OF WS-COUNT: 1

  3. Compile error

  4. None of the above

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

The variable WS-COUNT is set to zero. The conditional statement checks if WS-COUNT equals 0, which is true, executing the CONTINUE statement. Afterward, the ADD +1 TO WS-COUNT statement increments WS-COUNT to 1. Displaying the variable thus outputs the value 1.