|1||What is the size in bits for an int variable|
|2||What is the supported range for short data type|
|3||Order the following|
|4||What is the size in bytes for an short data type|
|5||What is the size in bits for an byte data type|
|6||Choose data type for information in range 100 to 500|
|7||Choose data type for information in range 91345 to 121887|
|8||Choose appropriate data type for number of cards|
|9||Choose appropriate data type for storing the number of facebook users|
|10||Choose appropriate data type to store the cube of 25|
|11||Choose appropriate data type to store the square of values ranging from 99 to 300|
|12||Rajesh Memory Size|
|13||Largest Data Type|
Choose appropriate data type to store the square of values ranging from -99 to 300
Correct Answer : C
-99 * -99 = 9801
300 * 300 = 90000
So we need to use an optimal datatype whose range holds both of the above values. Range of
int is suitable size.
byte will not include both the values.
short includes first value but not the second one.
long includes both but using
int saves space.
Topic: Integer Data Types In Java