#include<stdio.h>
#define NUM 20
void copy(char str[],char dest[],int k)
{
char *s =str,*d =dest;
int i ;
for(i =1; i< k ; i++)
{
s++;
}
while((*d++ = *s++))
;
}
int main()
{
char str[NUM],dest[NUM];
int k;
printf("please show the strings limited in %d:",NUM);
scanf("%s",&str);
printf("please show the value of the K:\n");
scanf("%d",&k);
copy(str,dest,k);
printf("the string '%s' after index %d is: %s\n",str,k,dest);
return 0 ;
}