下列程序段的输出结果是_ int x=3; if(x=5) x++; printf("%d\n",x);

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/11 00:40:14

下列程序段的输出结果是_ int x=3; if(x=5) x++; printf("%d\n",x);
下列程序段的输出结果是_ int x=3; if(x=5) x++; printf("%d\n",x);

下列程序段的输出结果是_ int x=3; if(x=5) x++; printf("%d\n",x);
6,因为“=”是赋值号,在if中把x的值变为5,然后又加了1