#include #include void main() { int x = 12, y = 7, z = 2; z = x != 4 || y == 2; printf(“z = %d”, z); getch(); }  What will be the output of the program?

#include

#include

void main()

{

int x = 12, y = 7, z = 2;

z = x != 4 || y == 2;

printf(“z = %d”, z);

getch();

}

 What will be the output of the program?

A. z = 0

B. z = 1

C. z = 4

D. z = 3

Hướng dẫn

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

Xem lời giải

Xem lời giải

z = x != 4 || y == 2 = (x != 4) || (y == 2) = 1 || 0 = 1

 

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