12
5

because y=4+4+3+1
and x is incremented to 5

On Fri, Apr 29, 2011 at 2:01 PM, MANNU <[email protected]> wrote:

> *Can anyone please explain me the output of this program:*
>
> int x=1;
> int y=x++ + ++x + ++x + x++;
> cout<<y;
> cout<<x;
>
> --
> 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.
>



-- 
Nikhil Gupta
Senior Co-ordinator, Publicity
CSI, NSIT Students' Branch
NSIT, New Delhi, India

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