C Programming - Declarations and Initializations - Discussion
Discussion Forum : Declarations and Initializations - True / False Questions (Q.No. 5)
5.
Range of double is -1.7e-38 to 1.7e+38 (in 16 bit platform - Turbo C under DOS)
Answer: Option
Explanation:
False, The range of double is -1.7e+308 to 1.7e+308.
Discussion:
5 comments Page 1 of 1.
Waled said:
4 years ago
It's not correct.
Because the compiler stored -1 in if condition as (256).
First any negative number compiler store these bumbers by gets the 1's complement of the number than 2's complement 1's of -1 is ob11111110 and 2's is 0b11111111 and this number is 256 therefore 256 sure greater than the return of size of int (4 bytes).
Because the compiler stored -1 in if condition as (256).
First any negative number compiler store these bumbers by gets the 1's complement of the number than 2's complement 1's of -1 is ob11111110 and 2's is 0b11111111 and this number is 256 therefore 256 sure greater than the return of size of int (4 bytes).
Naresh said:
9 years ago
main()
{
if(sizeof(int)>-1)
printf("yes");
else
printf("no");
}-
Can anyone please explain the output of this program with reason?
{
if(sizeof(int)>-1)
printf("yes");
else
printf("no");
}-
Can anyone please explain the output of this program with reason?
Prakash said:
1 decade ago
If the range of double is -1.7e+308 to 1.7e+308.
Let us take 1.7e is x.
-x+308 to x+308.
Just give a value to x.
-1000+308 to 1000+308.
The range would be 308+308=616.
Let us take 1.7e is x.
-x+308 to x+308.
Just give a value to x.
-1000+308 to 1000+308.
The range would be 308+308=616.
Pranay said:
1 decade ago
Yes this is.
The Range of Double is -1.7e+308 to 1.7e+308.
The Range of Float is -3.4e+38 to 3.4 e+38.
The Range of Double is -1.7e+308 to 1.7e+308.
The Range of Float is -3.4e+38 to 3.4 e+38.
Meda Vinod Kumar said:
1 decade ago
The Range of Double is -1.7e+308 to 1.7e+308.
The Range of Float is -3.4e+38 to 3.4 e+38.
The Range of Float is -3.4e+38 to 3.4 e+38.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers