A

Admin • 833.24K Points
Coach

Q. Which data type is suitable for storing a number like?
25.00002500025

  • (A) double
  • (B) int
  • (C) both int and double
  • (D) float
  • Correct Answer - Option(A)
  • Views: 61
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

The number 25.00002500025 has high precision (many decimal places). To store such numbers accurately, we need a floating-point data type.

Why "double" is the best choice?

  • float (32-bit) has only 6-7 decimal places of precision, which may lose accuracy for very precise numbers.
  • double (64-bit) provides about 15-16 decimal places of precision, making it more suitable for storing high-precision numbers like 25.00002500025.

Why Other Options Are Incorrect?

(B) int ❌

  • int can only store whole numbers (e.g., 25, but not 25.00002500025).

(C) both int and double ❌

  • int cannot store decimal values, so this option is incorrect.

(D) float ❌

  • float may lose precision for very small decimal values, so it is not ideal for such cases.

Final Answer:

✅ (A) double is the best data type to store 25.00002500025 with high precision.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.