in this actually whats happening is :
int i=0;
while((i--)!=0)
i-=i++;
printf("%d\n",i);
here when i is compared to 0 i is 0 and then it is decremented to -1, while
loop never gets executed.
On Mon, Jul 4, 2011 at 3:54 PM, amit the cool <[email protected]>wrote:
> main()
> {
> int i=0;
> while(+(+i--)!=0)
> i-=i++;
> printf("%d",i);
> }
>
> output sud be 1
> bt it is -1;
> why??
>
> --
> 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.
>
>
--
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.