有以下程序
#include <stdio.h>
void fun(char *t,char *s)
{ while(*t!=0) t++;
while((*t++=*s++)!=0);
}
main( )
{ char ss[10]="acc",aa[10]="bbxxyy";
fun(ss,aa); printf("%s,%s\n",ss,aa);
}
程序的运行结果是
A.accxyy,bbxxyy
B.acc,bbxxyy
C.accxxyy,bbxxyy
D.accbbxxyy,bbxxyy
第1题:
有以下程序 #include <stdio.h> void fun(char *t, char *s) { while(*t!=0) t++; while( (*t++ = *s++ )!=0 ); main() { char ss[10]="acc",aa[10]="bbxxyy"; fun(ss, aa); printff"%s,%s\n", ss,aa); 程序的运行结果是
A.accxyy, bbxxyy
B.acc, bbxxyy
C.accxxyy, bbxxyy
D.accbbxxyy, bbxxyy
第2题:
有以下程序
#include <stdio.h>
void fun(char *t,char *s)
{while(*t!=0) t++;
while(*t++=*s++)!=0);
}
main()
{char ss[10]=”acc”,aa[10]=”bbxxyy”;
fun(ss,a
A.; printf(“%s,%s\n”,ss,a
A.;
}
程序的运行结果是( )。
A.accxyy,bbxxyy
B.acc,bbxxyy
C.accxxyy,bbxxyy
D.accbbxxyy,bbxxyy
第3题:
删除字符串的所有前导空格,请完善程序。 #include <stdio.h> void f1(char *s) { char *t; t=________; while(*s==' ') s++; while(*t++=*s++); return; } int main() { char str[80]; gets(str); f1(str); puts(str); return 0; }
第4题:
有以下程序: #include<stdio.h> void fun(char*t,char*s) { while(*t!=O)t++; while((*t++=*s++)!=0); } main { char ss[10]="acc",aa[10]="bbxxyy"; fun(ss,aa);printf("%S,%s",ss,aa); } 程序运行结果是( )。
A.accxyy,bbxxyy
B.ace,bbxxyy
C.accxxyy,bbxxyy
D.accbbxxyy,bbxxyy
第5题:
删除字符串的所有前导空格,请完善程序。 #include <stdio.h> void f1(char *s) { char *t; t=________; while(*s==' ') s++; while(*t++=*s++); } int main() { char str[80]; gets(str); f1(str); puts(str); return 0; }