int a=6,b=3;
printf("%d",(++a*b--));
++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
Comments
Leave a comment