#include<stdio.h>
#include<stdlib.h>
int substr(char dst[],char src[],int start,int len)
{
int i=strlen(dst);
dst[start+len]='\0';
for(;len--;start++)
{
dst[start]=src[start];
}
return i;
}
int main()
{
char dst[]="hello word ";
char src[]="study hard";
printf("%d\n",substr(dst,src,3,6));
substr(dst,src,3,6);
printf("%s\n",dst);
}
07-29
07-29
07-29
07-29
07-29