• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

please help me with this question... I have my exam next week

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am new to this forum. I became a member of this forum today.
Somebody plz help me with this question. I have my exam next week.

Question:
Which is the legal range for short?

a. -2^7 to 2^7 - 1
b. -2^8 to 2^8
c. -2^15 to 2^15 - 1
d. -2^16 to 2^16 - 1
e. 0 to 2^16 - 1

If somebody knows the ans plz explain how?

Regards,
Preethi

(inserted "^" to indicate to "to the power of" )
[ October 14, 2004: Message edited by: Barry Gaunt ]
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will find your answer, and much more, here!

Look for "Primitives".
[ October 14, 2004: Message edited by: Barry Gaunt ]
 
Preethi Tushar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the info.
I got the answer. Actually where I saw the question, it didn't have the symbol ^ between 2 and 15, so I read it as two hundred and fifteen. I think there was some printing mistake.

Regards,
Preethi
 
reply
    Bookmark Topic Watch Topic
  • New Topic