题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-29 22:06:34

[单选题]有以下程序 #include <stdio.h> #include <string.h> void fun(char *w,int m) {char s,*p1,*p2; p1=w;p2=w+m-1; while(p1
A.654321
B.116611
C.161616
D.123456

更多"[单选题]有以下程序 #include &lt;stdio.h> #i"的相关试题:

[单选题]有以下程序 #include # include char *fun(char *t) { char *p=t; return(p+strlen(t)/2); } void main() { char *str="abcdefgh"; str=fun(str); puts(str); } 执行后的输出结果是( )。
A.efgh
B.abcd
C.bcde
D.cdef
[单选题]有以下程序 #include "stdio.h" #include void main() { float x,y,z; scanf("%f,%f",&x,&y); z=x/y; while(1) { if(fabs(z)>1.0) { x=y; y=z; z=x/y; } else break; } printf("%f\n",y); } 通过键盘输入3.6,2.4,执行后的输出结果是( )。
A.1.5
B.1.6
C.2
D.2.4
[单选题]有以下程序   #include   struct ord   { int x,y;}dt[2]={1,2,3,4};   main()   {   struct ord *p=dt;   printf("%d,",++(p->x)); printf("%d\n",++(p->y));   }   程序运行后的输出结果是()。
A.1,2
B.4,1
C. 3,4
D.2,3
[单选题]有以下程序   #include   struct S   { int a,b;}data[2]={10,100,20,200};   main()   { struct S p=data[1];   printf("%d\n",++(p.a));   }   程序运行后的输出结果是()。   
A.10
B.11
C.20
D.21
[单选题]有以下程序 #include #define FUN1(a,b) a+b #define FUN2(a,b) a-b #define CAL(a,b) a*b+a+3 main() { printf("%d\n",CAL(FUN1(3,5),FUN2(4,5))); } 执行后的输出结果是( )。
A.29
B.28
C.27
D.30
[单选题]有以下程序   #include   int fun (int x,int y)   { if (x!=y) return ((x+y);2);   else return (x);   }   main()   { int a=4,b=5,c=6;   printf("%d\n",fun(2*a,fun(b,c)));   }   程序运行后的输出结果是 ()。
A.3
B.6
C.8
D.12
[单选题]有以下程序   #include   void main()   { int s;   scanf("%d",&s);   while(s>0)   { switch(s)   { case 1:printf("%d",s+5);   case 2:printf("%d",s+4); break;   case 3:printf("%d",s+3);   default:printf("%d",s+1);break;   }   scanf("%d",&s);   }   }   运行时,若输入1 2 3 4 5 0<回车>,则输出结果是( )。
A.6566456
B.66656
C.66666
D.6666656
[单选题]有以下程序   #include   void fun(char *c)   { while(*c)   { if(*c>='a'&&*c<='z') *c=*c-('a'-'A');   c++;   }   }   void main()   { char s[81];   gets(s); fun(s); puts(s):   }   当执行程序时从键盘上输入Hello Beijing<回车>,则程序的输出结果是( )。
A.hello beijing
B. Hello Beijing
C.HELLO BEIJING
D. hELLO Beijing
[单选题]有以下程序   #include   main()   { unsigned char a=8,c;   c=a>>3;   printf("%d\n",c);   }   程序运行后的输出结果是()。  
A.32
B.16
C.1
D.0
[单选题]有以下程序   #include   main()   { int x;   scanf("%d",&x);   if(x>15) printf("%d",x-5);   if(x>10) printf("%d",x);   if(x>5) printf("%d\n",x+5);   }   若程序运行时从键盘输入12<回车>,则输出结果为( )。
A.7
B.1217
C.12
D.17
[单选题]有以下程序 #include double f(double x); main() {double a=0; int i; for(i=0;i<30;i+=10) a+=f((double)i); printf(“%5.0f\n”,a); } double f(double x) {return x*x+1;} 程序运行后的输出结果是()。
A.503
B.401
C.500
D.1404

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码