For each of the following, assume that we are using a 32-bit system with single-precision (32-bit) floating point numbers (floats) in IEEE format, double-precision (64-bit) doubles in IEEE format, and 32-bit integers. Which of the following evaluate to true for all argument values? (Circle each that is always true).
char c = ..
int x = ..
short y = ..
float f = ..
double d = ..
c == (char)(float) c (True)
y == (short)(int) y
(True)
f == (float)(double) f (True)
d == (double)(float) d (False)
y == -(-y)
(True)
f == -(-f)
(True)
3/4 == 3/4.0 (false)
x == (x<<2)>>2
(false)
y == (y>>2)<<2
(false)
x<y == -x>-y (True)
Get Answers For Free
Most questions answered within 1 hours.