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

what are the interview question's in the language c

2 Answers   Nipuna,


What is difference between main and void main?

0 Answers  


what is the full form of c language

9 Answers   Satyam, TCS, VNC,


Explain the difference between getch() and getche() in c?

0 Answers  


Can you subtract pointers from each other? Why would you?

0 Answers  


what is real time system?what is the differance between hard and soft real time systems

2 Answers  


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

0 Answers  


main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }

6 Answers  


What is ## preprocessor operator in c?

0 Answers  


What are the string functions? List some string functions available in c.

0 Answers  


What is identifiers in c with examples?

0 Answers  


What are the advantages and disadvantages of pointers?

0 Answers  


Categories