I don't really understand the code, that's why I sent this post.
When a==1, the If statement is executed and function returns 1. When does it send a ? When a==1 the If part is executed not the else part.
I thought each time the function returns two values, "a" and 1 because 1 is the second...
Now when I see the code, find that I missed an important point :
Even if a function returns 1000 different values the only accepted one is the first.
So the 1 returned each time is simply ignored because that's the second returned value by factorial function.
Look at this code :
27: unsigned int factorial(unsigned int a)
29: if (a == 1)
30: return 1;
33: a *= factorial(a-1);
34: return a;
The code evaluates fcatorial of "a". The only point I don't get is the return in line 30. When the function is called...