主观

下列程序中的函数strcpy2()实现字符串两次复制,即将t所指字符串复制两次到s所指内存空间中,合并形成一个新字符串。例如,若t所指字符串为:efgh,调用strcpy2后,s所指字符串为:efghefgh。请填空。

#include  

#include  

void strcpy2(char *s,char *t)

{char *p=;

 while(*s++=*t++);

 s=s-1;

 while(=*p++);

}

main()

{char str1[100]="abcd",str2[]="efgh";

 strcpy2(str1,str2);  printf("%s\n",strl);

}

参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服