有以下程序
#include
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
第1题:
9、以下程序段运行后的输出结果是()。 int x=1,y=0; if(!x) y++; else if(x==0) if (x) y+=2; else y+=3; printf("%d\n",y);
A.0
B.1
C.2
D.3
第2题:
以下程序段运行后的输出结果是()。 int x=1,y=0; if(!x) y++; else if(x==0) if (x) y+=2; else y+=3; printf("%dn",y);
A.0
B.1
C.2
D.3
第3题:
分析程序段,最后y输出值是() int x=1,y=0; if(!x) y++; else if(x==0) if(x) y+=2; else y+=3;
A.0
B.1
C.2
D.3
第4题:
以下程序段运行后的输出结果是()。 int x=1,y=0; if(!x) y++; else if(x==0) if (x) y+=2; else y+=3; printf("%dn",y);
A.0
B.3
C.2
D.1
第5题:
(27)有以下程序
#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
第6题:
有以下程序
#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
第7题:
有以下程序 #include <stdio.h> int f(int x) { int y; if(x==0||x==1) return(3); y=x*x-f(x-2); return y; } main() { int z; z=f(3); printf("%d\n",z); } 程序的运行结果是
A.0
B.9
C.6
D.8
第8题:
有以下程序 #include <stdio.h> intf(int x) { int y; if(x==0||x==1) return(3); y=x*x-f(x-2); return y; } main() { int z; z=f(3); printf("%d\n",z); } 程序的运行结果是
A.0
B.9
C.6
D.8
第9题:
有以下程序: #include<stdio.h> main( ) {int x=1,y=0; if(!x)y++; else if(x==0) if(x)y+=2; else y+=3; Drintf("%d\n"。v); } 程序运行后的输出结果是( )。
A.3
B.2
C.1
D.0