700+ câu trắc nghiệm Ngôn ngữ lập trình C có đáp án - Phần 13

What is output? #include #include int main() { int x = 3; if (x == 2); x = 0; if (x == 3) x++; else x += 2; printf("x = %d", x); getch(); }

11/25

What is output? #include #include int main() { int x = 3; if (x == 2); x = 0; if (x == 3) x++; else x += 2; printf("x = %d", x); getch(); }

x = 2

x = 6

x = 0

Giải thích

Chọn A.