i have following code which gives strange output
#include<stdio.h>
void main()
{
float a, x;
a=6.7;
if(a==6.7)
printf("1\n");
else
printf("2\n");
x=8.5;
if(x==8.5)
printf("1\n");
else
printf("2\n");
}
output
$ ./a.out
2
1
if i suffix numbers with f e.g. "6.7f" in if condition then i get proper output, I don't get why is this strange behavior?