C
codefixer
Hello:
I am trying to understand why one of these crash while the other works
fine.
long recurssion(int t)
{
if(t <= 1)
return(1);
else
return(t * recurssion(t--)); //crashes
}
long recurssion(int t)
{
if(t <= 1)
return(1);
else
return(t * recurssion(t-1)); //works fine
}
Thanks.
I am trying to understand why one of these crash while the other works
fine.
long recurssion(int t)
{
if(t <= 1)
return(1);
else
return(t * recurssion(t--)); //crashes
}
long recurssion(int t)
{
if(t <= 1)
return(1);
else
return(t * recurssion(t-1)); //works fine
}
Thanks.