@ rohit y does it stop at -8 then?

On Wed, Aug 31, 2011 at 8:37 PM, rohit <[email protected]> wrote:

> while(--i > 0) //suppose i = 1 here, so --i becomes 0, hence the condition
> fails...so it will go 1 step back in recursion
> {
> main();
> printf("%d",i);
> }
>
> it will execute
>
> printf("%d",i) of prev recursion where i=0 now, so 0 gets printed...now
> again the condition is checked i=0, thrfore --i becomes -1, so condition
> fails
>
> it now executes printf("%d",i) of still prev recursion and i=-1
> here....this continues...
> I hope this clarifies
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/bAkVsFcLH_oJ.
>
> 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.
>



-- 
Aditi Garg
Undergraduate Student
Electronics & Communication Divison
NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
Sector 3, Dwarka
New Delhi

-- 
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