以下程序 #include<stdio.h> #include<string.h> main() { char*p1="abc",*p2="ABC",str[50]="xyz"; strcpy(ar+2,strcat(p1,p2)); printf("%s\n",str); } 的输出是______。
A.xyzabcABC
B.zabeABC
C.yzabcABC
D.xyabcABC
第1题:
下面程序的输出结果是( )。 #include<stdio.h> #include<string.h> main() {char p1[]="WHO",p2[]="who",str[50]="xyz"; strcpy(str+1,strcat(p1,p2)); printf("%s",str);}
A.xyzWHOwho
B.zWHOwho
C.zWHOwho
D.xWHOwho
第2题:
以下C程序段的输出结果是(30)。 #include <stdio. h> void abc(char *str){ int a, b; for(a=b=0;str[a]!='\O';a++)if(str[a]!='c') str[b++]=str[a]; str[b]='\O'; } void main(){ char str[]="abcdef"; abc(str); printf("str[]=%s",str); }
A.str[]=a
B.str[]=ab
C.str[]=abdef
D.str[]=abcdef
第3题:
下面程序的输出结果是 #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.xyabcABC
D.yzabcABC
第4题:
以下程序 #include<stdio.h> #include<string.h> main() { char*p1="abc",*p2="ABC",str[50]="xyz", strcpy(str+2,strcat(p1,p2)); printf("%s\n",str); } 的输出是______。
A.xyzabcABC
B.zabcABC
C.yzabcABC
D.xyabcABC
第5题:
下列程序段的运行结果是( )。
#include<stdio.h>
void main()
{ char str[]="ABC",*p=str;
printf("%d\n",*(p+3) );
}
A.67
B.0
C.字符'C'的地址
D.字符'C'
第6题:
下面程序的输出结果为______。 #include<string.h> main() { charP[17]="abc"="ABC".STR[50]="xyz"; strcpy(str,strcat(p1,p2)); printf(%s,str); }
A.xyzabcABC
B.abcABC
C.xyzabc
D.xyzABC
第7题:
当执行下面的程序时,如果输入ABC,则输出结果是 ( ) # include<stdio.h> # include<string.h> main( ) { char ss [10] ="12345"; gets(ss);strcat(ss"6789");printf("%s\n",ss); }
A.ABC6789
B.ABC67
C.12345ABC6
D.ABC456789
第8题:
下面程序的输出结果是
#include
#include
void main()
{
char p1[10],p2[10];
strepy(p1,”abc”):
strcpy(p2,”ABC”);
char str[50]=”xyz”;
strcpy(str+2,strcat(p1,p2));
cout <
}
A.xyzabcABC
B.zabcABC
C.xyabcABC
D.yzabcABC
第9题:
以下程序的输出结果是 ______。 #include<iostream.h> #include<string.h> void main(){ char *p1=",hello",*p2="world!",str[50]:"Hii"; strcpy(str+2,p1); strcat(str,p2); cout<<str; }
A.Hii,hello world!
B.hello world!
C.ii,hello world!
D.Hi,hello world!
第10题:
以下程序 #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