未知题型
以下程序 #include<stdio.h> #include<string.h> main() { char*pl='abc',*p2='ABC',str[50]='xyz'; strcpy(str+2.strcat(p1,p2)); printf('%s/n,str); } 的输出是______。
A.xyzabcABC
B.zabcABC
C.yzabcABC
D.xyabcABC
- A.h>
B.h>
C.strcat(p1,p2));
D.xyzabcABC
B.zabcABC
C.yzabcABC
【参考答案】
D
解析: strcat(p1,P2)将字符串abcABC放到了*pl所指向的存储单元中;strcpy在本题将a......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)
点击查看答案
相关考题
-
未知题型
下面程序 main() { int x=100,a=10,b=20,okl=5,ok2=0; if(a<B) if(b!=15) if(!ik1) x=1; else if(ok2)x=10; x=-1; printf('%d/n',x); } 的输出是______。D.不确定的值
A.-1
B.0
C.1 -
未知题型
下面程序 main() { int x=32; print('%d/n',x=x<<1); } 的输出是______。D.64
A.100
B.160
C.120 -
未知题型
以下程序的输出结果是______。 #include<stdio.h> #define FUDGE(y) 2.84+y #define PR(a) printf('%d',(int)(a)) #define PRINT() PR(s) ;putchar('/n') main() { intx=2; PRINT1 (FUDGE(5)*x); }A.11B.12C.13D.15
A.h>
B.84+y
C.11
B.12
C.13
