long
is used to increase the length of a data type to4
more bytes
Forlong double
in the table, it shows allocated size in bytes is 16 bytes and values range is+/- 1.7e +/- 308 (~15 digits)
which is equivalent to the values range fordouble
.
Doesn’t seem to tally with the description of what long
does for an increase in bytes and the value range seems incorrect as well, shouldn’t value range and/or number of digits precision increase?
Did a quick search and based on Microsoft docs Built-in types (C++) | Microsoft Docs it seems like long double
is only allocated 8 bytes. Is that accurate?
Confused with how I should understand the usage of long with data types here, would appreciate help with understanding, thank you!
Type your question above this line.
Lesson: https://www.educative.io/collection/page/10370001/6619096843026432/4741386902437888