Ask Question
6 November, 06:09

What is the range of values that a short can represent?

a. 0 to 256

b. - 127 to 128

c. Math. pow (-2.0,15.0) to (Math. pow (2.0,15.0) - 1)

d. 0 to Math. pow (2.0,16.0)

+4
Answers (1)
  1. 6 November, 10:09
    0
    c. Math. pow (-2.0,15.0) to (Math. pow (2.0,15.0) - 1).

    Explanation:

    short represents a 16-bit signed integer. short is used to save memory because it occupies less space than integers where integers occupy 4 bytes short occupies 2 bytes.

    Since it is signed so first bit is used to represent the sign if 0 then positive and 1 then the integer is negative. We are left with 15 bits.

    So the range is - 2¹⁵ to 2¹⁵-1.

    Hence the answer is option c.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What is the range of values that a short can represent? a. 0 to 256 b. - 127 to 128 c. Math. pow (-2.0,15.0) to (Math. pow (2.0,15.0) - 1) ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers