更多“以下程序运行后的输出结果是______。 #include<stdio.h> void ast(int x,int y,int*cp,int*dp) { *”相关的问题
第1题
以下程序的输出结果是 。 #include <stdio.h> main() { int x=0,a=0,b=0; switch(x){ case 0: b++; case 1: a++; case 2: a++;b++;} printf(“a=%d,b=%d\n”,a,b); }
A、a=2,b=1
B、a=1,b=1
C、a=1,b=0
D、a=2,b=2
点击查看答案
第2题
以下程序执行后的输出结果是_______。 #include "stdio.h" void main() { int x=0,y=5,z=3; while(z-->0&&++x<5) y="y-1;"> A、3,2,0
B、3,2,-1
C、4,3,-1
D、5,-2,-5
点击查看答案
第3题
有以下程序: #include <stdio.h> main() { int x=3,y=2,z=1; printf("%d\n",x/y&~z); 程序运行后的输出结果是()。
点击查看答案
第4题
有以下程序: #include<stdio.h> main() { int w =4, x =3, y =2, z =1; printf ("%d\n", (w < x? w: z < y? y:x); } 程序的输出结果是
点击查看答案
第5题
有以下程序:#include <stdio.h>void f(int * x,int * y) int t; t= *x; *x= *y; *y=t;main (){ int a[8] = { 1,2,3,4,5,6,7,8} ,i, * p, * q; p=a;q =&a[7]; while(p<q) { f(p,q) ;p ++ ;q --; } for(i =0;i<8;i ++ ) printf(" % d," ,a[i]); }程序运行后的输出结果是()。
A.8,2,3,4.,5,6,7,1,
B.5,6,7,8,1,2,3,4,
C.1,2,3,4,5,6,7,8,
D.8,7,6,5,4,3,2,1,
点击查看答案
第6题
以下程序的输出结果: #include <stdio.h> struct { int x; int y; }s[2]={1,4,2,5}; void main() { printf("%d\n",s[0].y/s[0].x*s[1].x); }
点击查看答案
第7题
有以下程序: #include <stdio.h> int main() { int x,y,z; x=y=1; z=x++,y++,++y; printf("%d,%d,%d\n",x,y,z); } 程序运行后的输出结果是()。
点击查看答案
第8题
有以下程序#include <stdio.h>main() { int x=1, y=2, z=3; if(x>y) if(y<z) printf("%d", ++z); else printf("%d", ++y); printf("%d\n", x++);}程序的运行结果是A.331 B.41 C.2 D.1
点击查看答案
第9题
请选出以下程序的输出结果______。 #include<stdio.h> sub(x,y,z) int x,y*z; {*z=y-x;} main(){ int a,b,c; sub(10,5,&a);sub(7,a,&b);sub(a,b,&c); printf("%d,%d,%d\n",a,b,c); }
A.5,23
B.-5,-12,7
C.-5,-12,-17
D.5,2,-7
点击查看答案