Float can hold 6 significant digits and double 10 (this is how the book tells me).
Consider this code i wrote to test :
int main()
{
double a=355979.567; //9 significant digits i think
cout<<a;
return 0;
}
The o/p is 3555980. i thought since 'a' is double it should show me what i assigned(355979.567).
in fact the o/p is same for float and long double as well?
Any1 can explain this?
how do float double and long double really differ other than their sizes ?