Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Double datatype in C
#1
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.
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  User input and output with double in C Qomplainerz 0 276 07-26-2023, 06:03 PM
Last Post: Qomplainerz
  Basic arithmetic operations with the double datatype in C Qomplainerz 0 245 07-26-2023, 06:01 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 2 Guest(s)