#include<stdio.h>
main()
{
char ch[20],c;
int i,k;
printf("enter the string\n");
gets(ch);
printf("enter a character\n");
c = getchar();
for(k=0;k<=1;k++)
{
for(i=0;ch[i];i++)
{
if(ch[i]==c)
{
strcpy(ch+i,ch+i+1);
}
}
}
for(i=0;ch[i];i++)
{
printf("%c",ch[i]);
}
}
op :
enter the string
jeelebi
enter a character
e
jlbi
0 comments: