C Programming - Floating Point Issues - Discussion
Discussion Forum : Floating Point Issues - General Questions (Q.No. 4)
4.
Which of the following range is a valid long double (Turbo C in 16 bit DOS OS) ?
Answer: Option
Explanation:
The range of long double is 3.4E-4932 to 1.1E+4932
Discussion:
17 comments Page 1 of 2.
Bindhu said:
1 decade ago
Very good.
Dee said:
1 decade ago
Anyone explain this?
Kiran chowdary said:
1 decade ago
Can any one explain please?
Jitendra jain said:
1 decade ago
I explain it that it is a consatant and fixed size.
Suganya said:
1 decade ago
Please give a more explanation?
Kirti said:
1 decade ago
1.7E +/- 308 (15 digits) this answer is correct.
Pavan said:
1 decade ago
What is significance of 4932?
Pawan said:
1 decade ago
According to "Let us C" it is -1.7e4932 to 1.7e4932.
So please tell me which one is correct?
So please tell me which one is correct?
(1)
Sundar said:
1 decade ago
long double (80 bits or 10 bytes) : 3.4 * (10^-4932) to 1.1 * (10^+4932)
In Turbo C: (16 bit DOS Operating system).
#include<stdio.h>
int main()
{
printf("long double size = %d", sizeof(long double));
return 0;
}
Output: 10
If you execute the same in IndiaBIX's Online compiler (32 bit Linux OS), the output will be 12.
In Turbo C: (16 bit DOS Operating system).
#include<stdio.h>
int main()
{
printf("long double size = %d", sizeof(long double));
return 0;
}
Output: 10
If you execute the same in IndiaBIX's Online compiler (32 bit Linux OS), the output will be 12.
Ritesh_IIIT said:
1 decade ago
@Sundar.
Yes friend you are absolutely correct but in books long double range is given as -1.7e4932 to +1.7e4932 and of the size of 10 bytes with format specifier as %Lf.
Yes friend you are absolutely correct but in books long double range is given as -1.7e4932 to +1.7e4932 and of the size of 10 bytes with format specifier as %Lf.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers