On Wed, 18 Dec 2002 08:29:38 +0530 Abhijeet D Mhatre wrote:
# include <stdio.h> main(){ int fact; int x; fact=factorial(6); printf ("%i\n",fff()); }
int factorial(int x){ if(x>1) return(x*factorial(x-1)); }
int fff () { ; }
Naturally I was expecting 1 as the answer. But I am getting the answer 720 which is 6!.
Why were you expecting 1? Could you really expect any particular value from a call to fff()?