填空题
下列程序中的函数stropy2()实现字符串两次复制,即将t所指字符串复制两次到s所指内存空间中,合并形成一个新字符串。例如,若t所指字符串为:efgh,调用strcpy2后,s所指字符串为:efghefgh。请填空。
#include <stdio.h>
#include <string.h>
void strcpy2(char *s,char *t)
char *p=t;
while(*s++=*t++);
s= 【15】 ;
while( 【16】 =*p++);
main()
char str1[100]="abed",str2[]="efgh";
strcpy2(str1,str2); printf("%s\n",str1);
【参考答案】
[15]s-1或--s或s--
[16]*s++