*1st programe give output:199 but 2nd give Segmentation fault why* onle
change in return------------

*1)*  int fun(int i)
{
  if ( i%2 ) *return (i++);*
  else return fun(fun( i - 1 ));
}
int main()
{
  printf(" %d ", fun(200));
  getchar();
  return 0;
}

*2) *int fun(int i)
{
  if ( i%2 ) *return (++i);*
  else return fun(fun( i - 1 ));
}

int main()
{
  printf(" %d ", fun(200));
  getchar();
  return 0;
}



-- 
-- 
regards
*Sudhir Mishra*
MNNIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to