A more easier to see recursive factorial function that does the same thing would be something like:
Code:
unsigned int factorial(unsigned int a)
{
        if (a == 1)
                return 1;
        else {
                return a * factorial(a-1);
        }
}
Here you can see the actual multiplication folding out, a * (a - 1) * (a - 2) * ... * 1. Just something extra