Ask 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)

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

+3
Answers (1)
  1. 10 January, 16:37
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers