#include #include void main() { static int a[20]; int i = 0; a = i; printf(“%d %d %d”, a[0], a[1], i); getch(); } What will be the output of the program?

#include

#include

void main()

{

static int a[20];

int i = 0;

a = i;

printf(“%d %d %d”, a[0], a[1], i);

getch();

}

What will be the output of the program?

A. 1 0 1

B. 1 1 1

C. 0 0 0

D. 0 1 0

Hướng dẫn

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

Xem lời giải

Xem lời giải

Mảng static được tự động khởi tạo với giá trị 0

 

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

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