[Solved] : Question 13558

int y = 5,x;
x = (++y)+ (++y);
I would expect the value 13, but I got 14 as the output. any pointers?
what is funny is that the following code gives the value 13.

int y=5;
int x = (++y) + (++y);
The difference lies in declaration….! so how does it matter?

Expert Answer

Answer to : Question 13558

Leave a Comment


We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?