difference between float and double

float me = 1.1;
double you = 1.1;
printf("I love U");
printf("I hate U");

what is the output of the above program and please explain how
A double is a double precision floating point number. It has more memory and allows for a larger mantissa.


If you're seeing "I hate U" as the output of your program it is due to comparing floats/doubles. They're not likely to be exactly equal.


i compiled this code and got the answer as "i hate you".

Thank you for your reply iHutch105
Topic archived. No new replies allowed.