#include <stdio.h>
#include <string.h>
void delete_char(char *str, char ch) {
int i, j;
int len = strlen(str);
for (i = j = 0; i < len; i++) {
if (str[i] != ch) {
str[j++] = str[i];
}
}
str[j] = '\0';
}
int main() {
char str[100];
char ch;
printf("Enter a string: ");
fgets(str, 100, stdin);
printf("Enter character to delete: ");
scanf(" %c", &ch);
delete_char(str, ch);
printf("String after deletion: %s\n", str);
return 0;
}