+ 1

Can any one explain why we got this kind of output and also say me when " float is true " and "double is false" gets printed ?

#include<stdio.h> int main() { float i =0.1; double j =0.1; if(i == 0.1) puts("float is true\n"); else puts("float is false\n"); if(j == 0.1) puts("double is true\n"); else puts("double is false\n"); return 0; } ------------- Output: ------------- float is false double is true

25th Aug 2019, 9:41 AM
Kiran Deep Naidu
Kiran Deep Naidu - avatar
1 Respuesta
25th Aug 2019, 11:17 AM
HonFu
HonFu - avatar