我有这个C代码:
int a = 5;
printf("a is of value %d before first if statement. \n", a);
if (a = 0) {
printf("a=0 is true. \n");
}
else{
printf("a=0 is not true. \n");
}
printf("a is of value %d after first if statement. \n", a);
if (a == 0){
printf("a==0 is true. \n");
}
else{
printf("a==0 is not true. \n");
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
输出:
a is of value 5 before first if statement.
a=0 is not true.
a is of …Run Code Online (Sandbox Code Playgroud) c ×1