Required knowledge
Basic C Programming, Loop, String
C Program
#include < stdio.h > #include < conio.h > void main() { clrscr(); int i,j; char a[20],b; printf("Please Enter any String : "); gets(a); printf("Please Enter the Character that you want to Remove: "); b=getchar(); for(i=0;a[i]!='\0';i++) { if(a[i]==b) { for(j=i;a[j]!='\0';j++) { a[j]=a[j+1]; } } } printf("The Final String after Removing All Occurrences of '%c' = %s",b,a); getch(); }
Output
Please Enter any String : Harvindar Please Enter the Character that you want to Remove: a The Final String after Removing All Occurrences of 'a' = hrvindr
1 Comments
1xbet korean - ₹9280000 ₹200000₹4xbet lok
ReplyDelete1xbet korean - 샌즈카지노 ₹9280000 ₹200000 ₹200000 ₹4xbet lok. - 1xbet korean - 1xbet korean ₹9280000 ₹200000 ₹18000 바카라사이트 ₹12500.