题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-11-11 00:54:53

[单选题]下面程序的输出结果是()。 #include #include main() { char *p1="abc",*p2="ABC",str[50]= "xyz"; strcpy(str+2,strcat(p1,p2)); printf("%s\n",str);}
A.xyzabcABC
B.zabcABC
C.xyabcABC
D.yzabcABC

更多"[单选题]下面程序的输出结果是()。 #include #includ"的相关试题:

[单选题]若执行下面的程序从键盘上输入9,则输出结果是(  )
#include void main( ) {
Int n;
Scanf("%d",&n);
If (n++<10) printf("%d\n",n);
Else printf("%d\n",n--);
}
A.11
B. 10
C. 9
D. 8
[单选题]下列程序的输出结果是 ( )。 #include "stdio.h" main() { int i,a=0,b=0; for(i=1;i<10;i++) { if(i%2==0) {a++; continue;} b++;} printf("a=%d,b=%d",a,b); }
A.a=4,b=4
B. a=4,b=5
C. a=5,b=4
D. a=5,b=5
[单选题]有以下程序 #include "stdio.h" void main() { char s[12]= "a book"; printf("%.4s",s); } 执行后的输出结果是( )。
A.a book!
B.a book![四个空格]
C.a bo
D.格式描述错误,输出不确定
[单选题]有以下程序 #include main() { char p[]={′a′, ′b′, ′c′},q[10]={ ′a′, ′b′, ′c′}; printf("%d%d\n",strlen(p),strlen(q));} 以下叙述中正确的是 ( )。
A.在给p和q数组置初值时,系统会自动添加字符串结束符,故输出的长度都为3
B. 由于p数组中没有字符串结束符,长度不能确定,但q数组中字符串长度为3
C.由于q数组中没有字符串结束符,长度不能确定,但p数组中字符串长度为3
D.由于p和q数组中都没有字符串结束符,故长度都不能确定
[单选题]有以下程序 #include main() {char ch[3][5]={“AAAA”,”BBB”,”CC”}; printf(“%s\n”,ch[1]); } 程序运行后的输出结果是()。
A.AAAA
B. CC
C.BBBCC
D. BBB
[单选题]下列程序执行后的输出结果是()。 main() { char x=0xFFFF; printf("%d \n",x--); }
A.-32767
B.FFFE
C.-1
D.-32768
[单选题]下面程序是计算n 个数的平均值, 请填空(  )
#include void main(  )
{ int i,n;
Float x,avg=0.0;
Scanf("%d",&n);
For(i=0;i{ scanf("%f",&x);
Avg=avg+______; }
Avg=________;
Printf("avg=%f\n",avg); }
A. i avg/i
B. x avg/n
C. x avg/x
D. i avg/n
[单选题]请读程序.则下面程序的输出结果是(  ) m=1234.123; pitf(%8.3f3n",m); pit("%10.3n"r,m);
A.1234.12300- 1234.123... 选项1
B.1234.123 1234.123 选项34
C.1234.123 1234.12300- 选项33
D.1234.12300 1234.123 选项2
[单选题]下面程序的输出结果是(  )
#include
Void main( )
{ int x=10,y=10,i;
For(i=0;x>8;y=++i)
Printf("%d %d ",x--,y); }
A. 10 1 9 2
B. 9 8 7 6
C. 10 9 9 0
D. 10 10 9 1
[单选题]若有以下程序段,输出结果是( )。 char s[ ]="\\141\141abc\t"; printf ("%d\n",strlen(s));
A.9
B.12
C.13
D.14
[单选题]下列程序的输出结果是()。 main() { char a[10]={9,8,7,6,5,4,3,2,1,0},*p=a+5; printf("%d",*--p); }
A.非法
B.a[4]的地址
C.5
D.3
[单选题]阅读下面的程序,运行结果是()。 main() { char *str="ABCabcd"; bubble(str,5); printf("\n%s",str); } bubble(str,count) char *str; int count; { int i,j=count; char tmp; while(j-->1) for(i=0;iA.bacdCBA
B.baCBAcd
C.cdbaCBA
D.bCBAacd
[单选题]#include "stdio.h" void main( ) { char str[80]; scanf("%s",str); insert(str); } insert(char s[]) { int i; for(i=strlen(s);i>0;i--) { s[2*i]=s[i]; s[2*i-1]=' '; } printf("%s",s); } 如果输入的字符串是abcd, 则程序的运行结果是 ( ) 。
A. a b c d
B.a c b d
C.a b c d
D.d c b a
[单选题]下面程序的输出结果是 ( )。 main() { int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a; printf("%d\n",*(p+2));}
A.3
B.4
C.1
D.2
[单选题]下面程序输出得值为()
Importmath
Math.fabs(-3)
A.-3
B.3
C.-3.0
D.3.0
[单选题]下面程序的输出结果是 (  )
Int i=0,j=0,a=6;
If((++i>0)||(++j>0)) a++;
Printf("i=%d,j=%d,a=%d\n",i,j,A.;
A.i=0,j=0,a=6
B.i=1,j=0,a=7
C.i=1,j=1,a=6
D.i=1,j=1,a=7
[单选题]下面程序段的输出结果是()
Ls=['Python','C++','Java']
Fork,vinenumerate(ls):
Print(k,v)
A.Python
C++
Java
B.0Python
1C++
2Java
C.Python1
C++2
Java3
D.3Python
4C++
5Java
[单选题]以下程序输出结果是 。 #include "stdio.h" void f (); main() {int a; for(a=1;a<=3;a++) fun(); } void fun() {static int i=1; i+=3; printf("%2d",i); }
A.4 7 10
B.4 4 4
C.4 5 6
D.4 6 8
[单选题]下面代码的输出结果是
A.mir
B.mirror
C.mi
D.mirror

我来回答:

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

订单号:

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