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

where are auto variables stored? What are the characteristics of an auto variable?

0 Answers  


What is the ANSI C Standard?

0 Answers   Celstream,


What is difference between Structure and Unions?

0 Answers   TISL,


What is the stack in c?

0 Answers  


Design a program using an array that lists even numbers and odd numbers separately from the 12 numbers supplied by a user.

8 Answers  






Can i use Two or More Main Funtion in any C program.?

4 Answers  


What is the process to create increment and decrement stamen in c?

0 Answers  


we all know about the function overloading concept used in C++ and we all learnt abt that.... but that concept is already came in C in a very smaller propotion ... my question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION OVERLOADING IS USED in C language?????????????

4 Answers   Google,


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

0 Answers  


what will be the output of "printf("%d%d",scanf("%d% d",&a,&b))".provide an explation regarding the question

6 Answers  


What happens if header file is included twice?

0 Answers  


What is static and auto variables in c?

0 Answers  


Categories