What will you do to treat the constant 3.14 as a float?

Thục An

New member
What will you do to treat the constant 3.14 as a float?
A. use float(3.14f)
B. use 3.14f
C. use f(3.14)
D. use (f)(3.14)
 

Thanh Dat

New member
Hướng dẫn
Chọn B là đáp án đúng
Xem lời giải
Xem lời giải
Bạn có thể test bằng câu lệnh: sizeof(3.14f) = 4 (byte) (Visual C++ 2008 x86)