****************************************
* LUG meet on 12 Jan. 2003 @ VJTI
****************************************
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()?
--
Tahir Hashmi (VSE, NCST)
http://staff.ncst.ernet.in/tahir
tahir AT ncst DOT ernet DOT in
We, the rest of humanity, wish GNU luck and Godspeed
--
_______________________________________________
http://mm.ilug-bom.org.in/mailman/listinfo/linuxers