Also if b == 0 the function will return 1 because by mathematical definition 0! == 1.
In my opinion the function is writen incorrectly. It would be more consistent if the parameter would be defined as unsigned int and the return type as unsigned long long
I don't think your function is calci.ulating factorial at all. It's not calculating anything in fact. It just returns 2.
Imagine you use it with a=3;
You are not calculating any product only assign in eacch loop the value a had in the previous loop. Everytime a is bigger than 1 you have a series of loop like this:
a=3>1->c=3; and a=2
a=2>1->c=2 and a=1
a=1 so it stops. So c =2;
If the condition is not met not even once (a = 1 or less) c is 1.
As for the last thing you ask in your function definition argument int a is replaced by the value (number or variable) you are using as argument when you call the function