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 -2,147,483,648
to 2,147,483,647
. So 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.