compare floating point numbers

float a =0.7;
printf("%.7f",a);

what o/p are you expecting?
try printing this
printf("%.8f",a);

what difference do you see?

how can you compare two floating point values?

Comments

Popular posts from this blog