Why would the following statement assign 12 to x not 11?
Code:
int i=4;
int x = (++i) + (++i);
cout << x; // prints 12
int i=4;
int x = (++i) + (++i);
cout << x; // prints 12
(i * j++) + (i * j)
int i=2, j=3;
printf("%d \n", (i * j++) + (i * j));
int i=4;
int x = (++i) + (++i);
cout << x; // prints 12
Comment