Abstracting from the quality and the name of this function.
All static
variables are initialised only one time during the program startup, and remain its value.
When the startup routine calls main for the first time the variable i
has value 4. Then you decrease its value to 3 and call main again. This time the value of i
is 3 Then you decrease its value to 2 ......