#include #include void main() { int i = 5, j = 6, k; k = i & j; printf(“%d”, k); getch(); } What is output ?

#include

#include

void main()

{

int i = 5, j = 6, k;

k = i & j;

printf(“%d”, k);

getch();

}

What is output ?

A. 4

B. 0

C. 1

D. 5

Hướng dẫn

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

Xem lời giải

Xem lời giải

i = 5 = 101 (hệ nhị phân), j = 6 = 110 (hệ nhị phân). Phép toán & là phép toán AND bit. k = i&j = 100 = 4.

 

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