Question #154288

int a=6,b=3;

printf("%d",(++a*b--));


Expert's answer

++a -- increments value of a and returns it's new value

printf("%d", ++a); //7

b-- -- decrements value of b and returns it's old value

printf("%d", b--); //3


So, the value of (++a*b--) equals (a+1)*b = 21

So the result of this line of code

printf("%d", (++a*b--));

would be 21


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS