Hi,
Pls help me in solving the code snippet below.
It would be helpful if you could provide explanation on deriving the answer?
Find the output for this function. Let the value of m = 10;
int f1( int m)
{
if( m <= 0 )
{
return 1;
}
else
{
return ( (f1(m-1)) + (f1(m-2)) );
}
}
How many times this loop will run?
a) 34
b) 55
c) 89
d) Infinite loop
Thanks,
Suja.
Regards,
Suja
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
[Non-text portions of this message have been removed]