Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 is an lvalue in c?

0 Answers  


write a proram to reverse the string using switch case?

0 Answers   Syntel,


What is difference between class and structure?

0 Answers  


What is a memory leak? How to avoid it?

1 Answers  


how to print value of e(exp1)up to required no of digits after decimal?

1 Answers  


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

4 Answers   HCL,


What is a string?

0 Answers  


Explain what does it mean when a pointer is used in an if statement?

0 Answers  


program for reversing a selected line word by word when multiple lines are given without using strrev

0 Answers   IBM,


what is differnence b/w macro & functions

1 Answers  


Can we declare variable anywhere in c?

0 Answers  


diff between exptected result and requirement?

0 Answers   HCL,


Categories