6/5=1, in integer division, how come you can think it as 2?
On Tuesday, 3 July 2012 13:22:07 UTC+5:30, rahul sharma wrote:
>
> #include<stdio.h>
> #include<conio.h>
> int main()
> {
> int i;
> i=5;
> i=++i/i++;
> printf("%d",i);
> getch();
> }
>
> Why o/p is 1 and not 2?? what happened for post increment???
>
--
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/-/oW8rNHRnxVAJ.
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.