#include <stdio.h> #include <conio.h> int main() { int x = 3; if (x == 2); x = 0; if (x == 3) x++; else x += 2; printf("x = %d", x); getch(); }<

#include <stdio.h>
#include <conio.h>
int main()
{
int x = 3;
if (x == 2); x = 0;
if (x == 3) x++;
else x += 2;
printf("x = %d", x);
getch();
}</blockquote>
What is output?
A. x = 2
B. x = 6
C. x = 0
 
Hướng dẫn
Chọn A là đáp án đúng
Xem lời giải
Xem lời giải
x = 3, x = 0, x += 2 được thực hiện.