Ask your own question, for FREE!
Computer Science 20 Online
OpenStudy (anonymous):

x=5; y=(++x)+(x++)+(++x); what will the value of y???

OpenStudy (anonymous):

++x is using a preincrement operator what it does is it increments the value before the statement has been evaluated x++ is using a post increment operator what it does is it increments the operator after the statement has been evaluated the answer would be y= 6+5+6 y=17

OpenStudy (rsmith6559):

/* used ch interpreter www.softintegration.com */ int x = 5; int y = ( ++x ) + ( x++ ) + ( ++x ); printf( "%d\n", y ); 20

OpenStudy (anonymous):

20

OpenStudy (anonymous):

++x=add 1 then write the value x++=write the value then add1 y=(++x)+(x++)+(++x); y=6+6+1+7 hope u got the point......:)

OpenStudy (anonymous):

i think it will 21..but how????

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!