why integer range between -327680to+32767

Answers were Sorted based on User's Feedback



why integer range between -327680to+32767..

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

why integer range between -327680to+32767..

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

Post New Answer

More C Interview Questions

logic for x=y^n

1 Answers   Delphi,


What is register variable in c language?

0 Answers  


What is a method in c?

0 Answers  


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

0 Answers  


Explain what is wrong with this program statement?

0 Answers  






Write a program for print infinite numbers

3 Answers   Wipro,


give one ip, find out which contry

4 Answers   Google,


Why is void main used?

0 Answers  


WHAT IS ABSTRACT DATA TYPE

4 Answers   Wipro,


How do you use a pointer to a function?

0 Answers  


Write a code to remove duplicates in a string.

0 Answers   Expedia,


write a function that accepts an array A with n elements and array B with n-1 elements. Find the missing one in array B,with an optimized manner?

2 Answers   Zensar,


Categories