posted 16 years ago
This is the one from K&B 1.4 book:
Which three are valid declarations of a float? (Choose three.)
A. float f1 = -343;
B. float f2 = 3.14;
C. float f3 = 0x12345;
D. float f4 = 42e7;
E. float f5 = 2001.0D;
F. float f6 = 2.81F;
The answer is A,D,F .
Can you pleas explain why the options A,D are correct and B,C are not correct ?
Thanks.
Javardhan: