void main() { int i = 0; for (i = 0; i < 5; i++) if (i < 4) { printf(“Hello”); break; } getch(); } What is output ?

void main()

{

int i = 0;

for (i = 0; i < 5; i++)

if (i < 4)

{

printf(“Hello”);

break;

}

getch();

}

What is output ?

A.  Hello

B. Hello is printed 3 times

C. Hello is prined 4 times

D. Hello is printed 5 times

Hướng dẫn

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

Xem lời giải

Xem lời giải

Khi gặp lệnh break chương trình sẽ thoát khỏi vòng lặp gần nhất với nó.

 

Thư viện tài liệu12 Tháng bảy, 2023 @ 3:05 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