There are two printfs in the function, the last 3 printfs (n = -1 n = 0 n = 1) in your sequence
are printed by the second printf call, that's why it goes up again. You are forgetting about that one. When
the recursion ends, the function returns back to the previous level and continues
from there.
Eventually n-- is executed for n==0, n becomes negative, n >= 0 is evaluates
to false and countdown(n) is not executed any more. That's the terminal case.
That means that the function stops calling itself and continues and to the next statement which is the second
printf, which will print n = -1.
Then the function returns and the last and continues, which executes the second
printf and you get n = 0. Then the function ends and returns to the first
level, where the second printf is executed and you get n = 1. Then the
function returns back to main.
If you change the printfs a little bit in your recursion, you'll see
immediately why you get the output. Try this:
void countdown (int n)
{
printf("[1] n = %d\n", n);
n--;
if (n >= 0)
{
countdown(n);
}
printf("[2] n = %d\n", n);
}
Now the output will be
[1] n = 2
[1] n = 1
[1] n = 0
[2] n = -1
[2] n = 0
[2] n = 1