In C, if we execute the following code:
float a = 0.7;
if (a < 0.7)
{
printf("Less");
}
else
{
printf("no");
}
The code above code prints "Less".
But if we execute the following code:
float a = 1.7;
if (a < 1.7)
{
printf("Less");
}
else
{
printf("no");
}
It prints "no".
What's the reason for that? How does the float datatype work?