In php it is 19.

<?php
$x=5;
printf("%d",($x++ + ++$x + $x++));
?>


On Aug 28, 1: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].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to