how to write an optimized version of the following factorial recursion function in C along with some explanation please ??
int factorial(int num)
{
if (num == 0) return 1;
else return num * factorial(num - 1);
}
Looking forward for your help!
Thanks,
Nanda Kishor
http://www.c4swimmers.net