Skip to content

Instantly share code, notes, and snippets.

@qassa
Last active December 24, 2015 05:39
Show Gist options
  • Save qassa/6751706 to your computer and use it in GitHub Desktop.
Save qassa/6751706 to your computer and use it in GitHub Desktop.
//удаление из строки введенного с клавиатуры символа
#include<conio.h>
#include<stdio.h>
void del (char *start,char WORD){
int i=0,j=0,k=0;
for(;start[i]!='\0';i++){
if (start[i]==WORD){
for(k=i;start[k]!='\0';k++)
start[k]=start[k+1];
i--;
}
}
}
int main (){
char str1[50],word;
gets(str1);
scanf("%c",&word);
del(str1,word);
printf("\n%s",str1);
getch();
return 0;
}
//удаление из строки введенного с клавиатуры символа
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment