Our professor gave us the assignment to explain what happens while compiling this while loop in C. The loop should end after 10 repetitions but it does not. The output does not stop at f = 0.0 but outputs negative numbers, can somebody explain to me why this happens.
int main(){
float f = 1.0;
while (f != 0.0) {
f = f - 0.1;
printf("%d\n", f);
}
}