有以下程序 #include<stdio.h> main() (int x=1
题型:单项选择题
问题:
有以下程序
#include<stdio.h>
main()
(int x=1, y=0;
if(!x) y++;
else if(x==0)
if(x)y+=2;
else y+=3;
printf("%d\n", y);
程序运行后的输出结果是______。
A.3
B.2
C.1
D.0
有以下程序
#include<stdio.h>
main()
(int x=1, y=0;
if(!x) y++;
else if(x==0)
if(x)y+=2;
else y+=3;
printf("%d\n", y);
程序运行后的输出结果是______。
A.3
B.2
C.1
D.0