why integer range between -327680to+32767
Answers were Sorted based on User's Feedback
Answer / jim
Question is in error! It should read -32768 to 32767.
An unsigned 16-bit value ranges from 0...65535.
In Hex 0...FFFF
A signed 16-bit value ranges from -32768 ... 32767
In hex 8000...7FFF
Just as 0 is 0, 1 is 1, 7FFF is 32767, FFFF is -1,
8000 is -32768.
So...
8000 FFFE FFFF 0 0001 0002 7FFF
-32768 -2 -1 0 1 2 32767
| Is This Answer Correct ? | 22 Yes | 3 No |
Answer / nilay
as interger requires 2 bytes means 16 bits i.e. 2 raised to
15 ( 1 bit for sign bit to indicate no. is +ve or -ve) is
32768 to 32767 .if sign bit is not included then it is 2
raised to 16 i.e. 65535.
| Is This Answer Correct ? | 17 Yes | 0 No |
What is an lvalue in c?
write a proram to reverse the string using switch case?
What is difference between class and structure?
What is a memory leak? How to avoid it?
how to print value of e(exp1)up to required no of digits after decimal?
f=(x>y)?x:y a) f points to max of x and y b) f points to min of x and y c)error
What is a string?
Explain what does it mean when a pointer is used in an if statement?
program for reversing a selected line word by word when multiple lines are given without using strrev
what is differnence b/w macro & functions
Can we declare variable anywhere in c?
diff between exptected result and requirement?