When I do this -
int i = 4;
printf("\n %d", ++i + ++i);
I get 12 as the answer. But when I do this -
int i = 4;
int a,b,s;
a = ++i;
b= ++i;
s = a+b;
printf("%d", s);
I get 11 as the answer. Why?
I have tried both the code.
The expected value is 11 but why it is getting 12 in the first code?