0
Why output of the following code is false ?
#include<stdio.h> //#include<conio.h> int main(){ float f=0.1; if(f==0.1) printf("True"); else printf("False"); return 0; }
1 Resposta
+ 10
f is a float.
0.1 is a double.
Also see here:
https://www.geeksforgeeks.org/comparison-float-value-c/