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

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)

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)

 

Thư viện tài liệu12 Tháng bảy, 2023 @ 2:55 chiều

Đánh giá chủ đề này

Tài liệu hay phù hợp tiêu chí cho: What will you do to treat the constant 3.14 as a float?

Bạn đang xem: What will you do to treat the constant 3.14 as a float? trong chuyên mục: HỎI VÀ ĐÁP

How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site