QP School
Double datatype in C - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: C 18 Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=32)
+--- Thread: Double datatype in C (/showthread.php?tid=5152)



Double datatype in C - Qomplainerz - 07-26-2023

Description:

The double data type in C is used to store double-precision floating-point numbers. It typically occupies 8 bytes of memory and offers higher precision compared to the float data type. Double-precision floating-point numbers can represent a broader range of real numbers with greater accuracy.

Example:

double pi = 3.14159265359;

Explanation:

In this example, we declare a variable pi of type double.
We initialize it with the value 3.14159265359.
The double data type provides higher precision than float and can represent real numbers with a range of approximately ±1.8E+308 and typically has 15 to 17 significant decimal digits of precision.