Header
TOPIC DETAILS
AUTHOR

Difference Between Float & Double Data Types?

What Is The Difference Between Float & Double Data Types With Reference To Number Of Digits Before And After Decimal Point? While Printing Them Using %f For Float And %lf For Double, How Many Digits After The Decimal Place Should Be Given In The Answer In Both The Cases?

Ankur

>> Float is a single precision (32 bit) floating point data type as defined by IEEE 754 double is a double precision (64 bit) floating point data type as defined by IEEE 754 A variable of type float only has about 7 digits of precision whereas a variable of type double has about 15 digits of precision for details - http://en.wikipedia.org/wiki/IEEE_754-1985#Range_and_precision