Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- void delete(char x[],char c){
- int size = strlen(x);
- int i=0,j=0;;
- char p[size];
- while(i<size){
- if(x[i]!=c){
- p[j]=x[i];
- j++;
- }
- i++;
- }
- printf(p);
- }
- int main(){
- char c;
- char u[50];
- gets(u);
- scanf("%c",&c);
- delete(u,c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment