更多“有以下程序 #include<stdio.h>struct ord {int x,y;} dt[2]={1,2,3,4};main(){ struct ord”相关的问题
第1题
#include <stdio.h> int fun(int x, int y) { if(x>y) return x; else return y; } void main() { int x=3,y=8,z=6,r; r=fun(fun(x,y),2*z); printf("%d\n",r); } 下面程序输出结果是:
点击查看答案
第2题
#include <stdio.h> int main( ) { int x=1, y=1, z=1; switch(x) { case 1: switch(y) { case 1: printf("!!"); break; case 2: printf("@@"); break; case 3: printf("##"); break; } case 0: switch(z) { case 0: printf("$$"); case 1: printf("^^"); case 2: printf("&&"); } default: printf("**"); } return 0; } 该程序的运行结果是________
点击查看答案
第3题
有下列程序:
#include
structord
{intx,y;}dt[2]={1,2,3,4};
voidmain()
{structord*p=dt;
printf("%d,",++P->x);printf("%d,",++P
->y);
}
程序的运行结果是().
A.1,2
B.2,3
C.3,4
D.4,1
点击查看答案
第4题
#include <stdio.h> main() { int a=2,b=3; float x=3.9,y=2.3; float r; r=(float)(a+b)/.2+(int)x%(int)y; printf("%f\n",r); } 程序的运行结果为 。
点击查看答案
第5题
以下程序的执行结果是() #include <stdio.h> int multi(int x,int y); void main() { int a,b,c; a=10,b=12; c=mult(a,b); printf("%d*%d=%d",a,b,c); } int multi(int x,int y) { return x*y; }
点击查看答案
第6题
下述代码,输出结果为 # include <stdio.h> int f3(int &x,int &y) { x=2*y; return 3*x; } int main() { int a=5,b=6; printf("a=%d,b=%d\n",a,b); f3(a,b); printf("%d\n",a); return 0; }
点击查看答案
第7题
# include <stdio.h> main( ) { int x[ ] = {10, 20, 30, 40, 50 }; int *p ; p=x; printf ( “%d”, *(p+2 ) ); } 运行结果为______
点击查看答案
第8题
#include <stdio.h> int Fun(int x, int y) { x=x+y; y=x+y; printf("x=%d,y=%d\n",x,y); return x+y; } int main() { int x=5, y=8; int z=Fun(x,y); printf("x=%d,y=%d,z=%d\n",x,y,z); return 0; } 以上程序的输出结果是:
点击查看答案
第9题
有以下程序 #include<stdio.h> main() {int x,y; scanf(”%2d%*3d%d”,&x,&y); printf(”%d\n”,x+y); } 程序运行时输入:1234567程序的运行结果是
点击查看答案