Multiple choice technology testing

What is the output of the following code snippet?

@echo off 
set /a number = 5 
:loop 
set /a number = %number% +1 
If %number% == 10
 (goto :label) 
else 
  (echo %number% >> c:\test.txt) 
goto :loop

  1. Prints numbers from 6 to 9 into c:\test.txt

  2. Prints numbers from 5 to 10 into c:\test.txt

  3. Prints only 10 to c:\test.txt

  4. Infinite loop

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

The loop initializes number=5, then increments it before each check. When number becomes 6 through 9, it echoes these values to the file. When number reaches 10, the condition is true and execution jumps to :label, exiting the loop. Thus only numbers 6, 7, 8, and 9 are written to c:\test.txt.