Consider the code below:
float a = 0.7;
if(0.7 > a)
printf("Hi");
else
printf("Hello");
// The output will be: Hi
Why does the if statement in here return true? But if I replace a with 0.7 then it returns false? How is 0.7 greater than a? and this doesn't happen with 0.5 or something else. Why does this happen?