By executing this code:
float f = 1.0;
while (f != 0.0) {
f = f - 0.1;
printf("%.1f\n", f);
}
It is expected that it would run 10 times and stop, but what turns out is that it inevitably goes into stack overflow. The same happens even if I change the while loop such that f goes to any other value below 1.0;
Anyone care to explain?