Here is the code compiled in dev c++ windows:
#include <stdio.h>
int main() {
int x = 5;
printf("%d and ", sizeof(x++)); // note 1
printf("%d
", x); // note 2
return 0;
}
I expect x
to be 6 after executing note 1. However, the output is:
4 and 5
Can anyone explain why x
does not increment after note 1?