hi guys , this is a program to read string S1 ,go to index k, and delete the
char located in index k. but its giving me an error that declaration terminated incorrectly could anyone help me plz ? here is the code.
Code:#include <stdio.h>
#include <conio.h>
#include <string.h>
void delete(char x[],int size,int k)
{
int i;
for(i=k;i<=strlen(x);i++)
x[i]=x[i+1];
strcpy(&x[k],&x[k+1]);
}
main()
{
char S1[10];
int k;
scanf("%s%d",S1,&k);
delete(S1,10,k);
getch();
}