C++ float, double and long double | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

C++ float, double and long double

can someone explain float double and long double in simple terms so I can understand

14th May 2017, 3:05 PM
Kyroh
Kyroh - avatar
2 Respostas
+ 19
FloatsĀ have less precision than doubles. ... typeĀ float, 32 bits long, has a precision of 7 digits. While it may store values with very large or very small range (+/- 3.4 * 10^38 or * 10^-38), it has only 7 significant digits. typeĀ double, 64 bits long, has a bigger range ( *10^+/-308) and 15 digits precision. And if you're still in doubt, you can code and check it out :)
14th May 2017, 3:19 PM
Dev
Dev - avatar
+ 3
long , short , signed are called datatype modifier. we know that int , float , double..... have certain limits of value. by adding these modifier on front of data types we change the limit ( decrease / increase). learn more: https://www.tutorialspoint.com/cplusplus/cpp_modifier_types.htm
14th May 2017, 3:22 PM
MR Programmer
MR Programmer - avatar