#include #include int main() { int a = 0, i = 0, b = 0 ; for (i = 0; i < 5; i++) { a++; continue; b++; } printf(“n a = %d,b =%d”, a, b); getch(); } What is output?

#include

#include

int main()

{

int a = 0, i = 0, b = 0 ;

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

{

a++;

continue;

b++;

}

printf(“n a = %d,b =%d”, a, b);

getch();

}

What is output?

A. a = 5,b = 5

B. a = 4,b = 4

C. a = 5,b = 0

D. Another

Hướng dẫn

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

Xem lời giải

Xem lời giải

Gặp lệnh continue, complier sẽ bỏ qua các câu lệnh tiếp theo và thực hiện hiện 1 vòng lặp mới. Như vậy, câu lệnh b++ sẽ không bao giờ được thực hiệ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