[单选题]

下列程序的输出结果是( ) main() {char*p1,*p2,str[50]="xyz"; p1="abcd"; p2="ABCD"; strcpy(str+2,strcat(p1+2,p2+1)); printf("%s",str); }

A.xyabcAB

B.abcABz

C.Ababcz

D.XycdBCD

参考答案与解析:

相关试题

char *p1=“abcd”, *p2=“ABCD”,str[50]=“xyz

[试题]char *p1=“abcd”, *p2=“ABCD”,str[50]=“xyz”;strcpy(str+2,strcat(p1+2,p2+1));printf(“%s”,str); 请问输出结果?

  • 查看答案
  • 下列程序的输出结果是#includevoid main(){char*str="

    [单选题]下列程序的输出结果是includevoid main(){char*str="12123434";int x1=0,x2=0,x3=0下列程序的输出结果是 #include<iostream.h> void main() {char*str="12123434"; int x1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!='/0';i++) switch(str[i]) {case'1':x4++; case'2':X3++; case'3':

  • 查看答案
  • 下列程序的输出结果是#includevoid main(){char*str="

    [单选题]下列程序的输出结果是includevoid main(){char*str="12123434"; int x1=0,x2=0,x3=下列程序的输出结果是 #include<iostream.h> void main() { char*str="12123434"; int x1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!=‘/0’;i++) switch(str[i]) { case'l':x4++; case'2':X3++; case'3':

  • 查看答案
  • 以下程序的输出结果是( )。main{char str[]1£­10]={"ch

    [单选题]以下程序的输出结果是( )。main{char str[]1-10]={"china","beijing"),*p=str;printf("%s\n",p+10);}A.ChinaB.BeijingC.ngD.ing

  • 查看答案
  • 以下程序的输出结果是______。#includemain(){char *p1

    [单选题]以下程序的输出结果是______。#includemain(){ char *p1,*p2,str[50]="ABCDEFG"; p1="abcd";p2="efgh"; strcpy(str+1,p2+1);strcpy(str+3,p1+3); printf("%s",str);}A.AfgdEFGB.AbfhdC.AfghdD.Afgd

  • 查看答案
  • 下面程序的输出结果是______。#includemain(){char*p1=

    [单选题]下面程序的输出结果是______。includemain(){char*p1="abc",*p2="ABC",s[20]="xyz"; s下面程序的输出结果是______。 #include<string.h> main() { char*p1="abc",*p2="ABC",s[20]="xyz"; strcpy(s+1,p2); strcat(s+2,p1); printf("%s/n",s); }A.xABCabcB.zABCabcC.yzabcABCD.xyz

  • 查看答案
  • 下列程序的输出结果是#includevoid main( ){char*str=

    [单选题]下列程序的输出结果是includevoid main( ){char*str="12123434";int xl=0,x2=0,x3=下列程序的输出结果是 #include<iostream.h> void main( ) {char*str="12123434"; int xl=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!='/0';i++) switch(str[i]) {case'1':x4++; case'2':x3++; case'3'

  • 查看答案
  • 以下程序的输出结果是void fun(float*p1,float*p2,flo

    [单选题]以下程序的输出结果是 void fun(float*p1,float*p2,float*s) { s=(float*)calloc(1,sizeof(float)); *s=*p1+*p2++;} main() { float a[2]={1.1,2.2},b[2]={10.0,20.0},*s=a; fun(a,b,s); printf("%5.2f/n",*s);}A.11.1B.12C.21.1D.1.1

  • 查看答案
  • 下面程序的输出是______。fun(char *s,int p1,int p2

    [单选题]下面程序的输出是______。 fun(char *s,int p1,int p2) { char c; while(p1<p2) { c=s[p1];s[p1]=s[p2];s[p2]=c;p1++;p2--;} } main() { char a[]="ABCDEFG",k,*p; fun(a,0,2);fun(a,4,6); printf("%s/n ",a); }A.ABCDEFGB.DEFGABCC.GFEDCBAD.CBADGFE

  • 查看答案
  • 分析下列程序: #include main() {int*p1,*p2,*p;

    [单选题]分析下列程序: include main() {int*p1,*p2,*p; inta=6,b=9; p1=&a;p2=&b; if分析下列程序:#include<stdio.h>main(){ int*p1,*p2,*p;inta=6,b=9;p1=&a;p2=&b;if(a<B) {p=p1;p1=p2;p2=p;}printf("%d,%d",*p1,*p2) ;printf("%d,%d",a,B) ;}程序的输出结果为( )。A.9,6 6,9B

  • 查看答案
  • 下列程序的输出结果是()main(){char*p1,*p2,str[50]="