it sud b 19 naaa

x++ = 5
++x = 7
x++ = 7

5+7+7

On Sat, Aug 28, 2010 at 4:35 PM, jagadish <[email protected]> wrote:

> I ran this code..
>
> int main() { int x=5;
> printf("%d",(x++ + ++x + x++));
> }
>
> The output printed was 18 instead of 19.. Should it not be 19?
>
> --
> 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]<algogeeks%[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.

Reply via email to