On Nov 23, 2007 6:24 AM, sivag9 <[EMAIL PROTECTED]> wrote:
>
> hi everybody,
>   i have one qs
>
> fun(int i)
> {
>   printf("%d",i)
>  fun(i);
> }
>
> what the o/p and what happend to the stack.

Google for 'recursive function'.

You're calling the function, which calls the same function, which
calls the same function, which ...

The first call never completes. Each call uses up some memory on the
'stack' which is finite.  You eventually run out of 'stack'.

-- 
PJH
"Statistics are like a bikini. What they reveal is suggestive, but
what they conceal is vital"
-- Aaron Levenstein

Reply via email to