I have the following code and it seems to me that it should always enter the true part of the if
statement but, beyond 120, it appears to start executing the else
clause. Why is that happening?
char x;
for (i=0;i<256;i+=10) {
x=i;
if (x==i)
printf("%d true\n",i);
else
printf("%d false\n",i);
}
The output is:
0 true
10 true
: all numbers from 20 to 100 are true
110 true
120 true
130 false
140 false
: all numbers from 150 to 230 are false
240 false
250 false