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
πŸ’¬ Discuss
βœ… Correct Answer: (D) 1.7E - 308 to 1.7E + 308
Explanation:

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)?

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)?

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
335
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Akash Lawaniya
Publisher
πŸ“ˆ
85%
Success Rate