#include #include void main() { float n = 1.67; printf(“%e, “, n); printf(“%f, “, n); printf(“%g, “, n); printf(“%lf, “, n); getch(); } What will be output of the program?

#include

#include

void main()

{

float n = 1.67;

printf(“%e, “, n);

printf(“%f, “, n);

printf(“%g, “, n);

printf(“%lf, “, n);

getch();

}

What will be output of the program?

A. 1.670000e+000, 1.670000, 1.67, 1.670000,

B. Complier Error

C. 1.67e, 1.67000, 1.670, 1.67

D. 1.67e, 1.67, 1.67000, 1.67f

Hướng dẫn

Chọn A là đáp án đúng

Xem lời giải

Xem lời giải

%e: in ra kiểu số mũ.

%f: in ra kiểu dấu phẩy động

%g: in ra dạng rút gọn của %f hoặc %e

%lf: in ra kiểu dấu phẩy động.

 

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

Đánh giá chủ đề này
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