#include<iostream>
using namespace std;
void insert(char *s,char *t,int pos)
{
int i=1,x=0,j;
char *p=s,*q=t;
if(pos<1)
{cout<<"pos参数位置非法"<<endl;exit(0);}
while(*p&&i<pos){p++,i++;}
if(*p=='\0'){ cout<<pos<<"位置大于字符串s的长度";exit(0);}
else
{
while(*p){p++,i++;}
while(*q){x++;q++;}
for(j=i;j>=pos;j--)
{
*(p+x)=*p;
p--;
}p++;
for(i=0;i<x;i++)
{
*p++=*t++;
}
}
}
int main()
{
int pos;
char s[100],t[20];
scanf("%s %s",s,t);
scanf("%d",&pos);
insert(s,t,pos);
puts(s);
return 0;
}
08-14
710