Please consider the following code
Surprisingly (for me) it printedCode:void main()
{
float a = 0.7;
if(a <= 0.7)
printf("Less or equal");
else
printf("Greater");
}
However, when I change the initialization expression to the followingCode:Greater
and change the if condition toCode:float a = 0.8;
it prints the expected output:Code:if(a <= 0.8)
Kindly explain. Thank you in advance.Code:Less or equal