/* Exercise 2-4. Write an alternate version of squeeze(s1,s2) that deletes each character in s1 that matches any character in the string s2. */ #include #define MAXLINE 1000 /* maximum input line size */ int my_getline(char line[], int maxline); void squeeze(char s1[], char s2[]); /* testing code */ main() { int c, i; char line[MAXLINE]; /* current input line */ char s2[] = "abc"; while (my_getline(line, MAXLINE) > 0) { squeeze(line, s2); printf("%s\n", line); } return 0; } /* getline: read a line into s, return length */ int my_getline(char s[], int lim) { int c, i; for (i=0; i