a) -128 to 127
b) -32768 to 32767
c) -2147483648 to 2147483647
d) None of the mentioned
Short occupies 16 bits in memory. Its range is from -32768 to 32767.
a) -128 to 127
b) -32768 to 32767
c) -2147483648 to 2147483647
d) None of the mentioned
Byte occupies 8 bits in memory. Its range is from -128 to 127.
a) int
b) long
c) byte
d) float
An expression involving bytes, ints, shorts, literal numbers, the entire expression is promoted to int before any calculation is done.
a) -1.7e+308
b) -3.4e+038
c) +1.7e+308
d) -3.4e+050
Range of float data type is -(3.4e38) To +(3.4e38)
a) int
b) float
c) double
d) long
Only double data type value is returned by all transcendental math functions. Transcendental math functions don’t return int or long. They return double instead of float as double has larger range.
Items per page: