+ 1

The size of double and long double in floating point data type is same 8 bytes. Then what is difference between them?

16th Jun 2016, 3:02 PM
Shrishail Mulawad
Shrishail Mulawad - avatar
4 ответов
+ 1
long is for integer type data ,mostly 4 bytes double is for floating point data
16th Jun 2016, 3:54 PM
Piyush Gupta
Piyush Gupta - avatar
+ 1
This also depends on the compiler. Visual Studio will actually give you a double if you try to use a float. you have to verify that you, indeed, wanted to use a float.
21st Jun 2016, 11:27 PM
MaxCode
0
if u observe that table more keenly then you will see that those are MINIMUM size.. long double provide wider range then double.. and thus long double works more precisely! :)
22nd Sep 2016, 6:16 PM
chitralekha kachhawa
chitralekha kachhawa - avatar
- 1
for practical use as a novice, as I understand it, excluding memory points... int holds whole numbers... double isn't an int... so can use to hold decimal numbers. :-)
16th Jun 2016, 7:46 PM
Sparkone
Sparkone - avatar