#include
using namespace std;
char * insert(char * s, char c,int n)
{
int len=strlen(s);
if(n<=0){
char * p=s;
p=p+len+1;
do{
*p=*(--p);
}while( p>s);
(*p)=c;
}else if(n>=len){
*(s+len)=c;
*(s+len+1)='\0';
}else {
char * p=s+len+1;
do{
*p=*(--p);
}while( p>s+n);
(*p)=c;
}
return s;
}
int main()
{
char as[20]="this is an Example.";
char c;
c=getchar();
cout<
cout<<"insert(as,c,17):"<
cout<<"insert(as,c,6):"<
cout<<"insert(as,c,0):"<