A

Akash Lawaniya • 9.58K Points
Tutor III

Q. Which of the following is valid range of long double ?

  • (A) 3.4E-4932 to 1.1E+4932
  • (B) 3.4E-4932 to 3.4E+4932
  • (C) 1.1E-4932 to 1.1E+4932
  • (D) 1.7E - 308 to 1.7E + 308

Explanation by: Mr. Dubey

The valid range of long double depends on the system and compiler, but typically for most modern compilers (like GCC with x86-64 architecture using 80-bit extended precision), the range is:

Correct Answer:

(A) 3.4E-4932 to 1.1E+4932

Explanation:

  • long double in most modern systems uses 80-bit extended precision (sometimes 128-bit on specific architectures).
  • Its range is significantly larger than double, which has a range of approximately 1.7E-308 to 1.7E+308.
  • The values 3.4E-4932 to 1.1E+4932 match the standard long double range on many x86-64 systems.

Would you like to confirm the range for a specific compiler (like GCC, Clang, or MSVC)?

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics