#include
#include
char s[10000];
char c;
int main()
{
printf("Input the original string:\n");
gets(s);
printf("The original string is: %s\n",s);
printf("Input the char should be deleted:\n");
scanf("%c",&c);
printf("The char should be deleted is %c\n",c);
for(int i=0;s[i];i++)
if(s[i]==c)
{
memmove(s+i,s+i+1,strlen(s+i+1)+1);
break;
}
printf("The string after delete operation is: %s\n",s);
return 0;
}