K&R Exercises

Exercise 2-4: Squeeze out characters

Write an alternative version of squeeze(s1,s2) that deletes each character in s1 that matches any character in the string s2.

The input is pairs of lines: s1, then s2, without their newlines. For each pair, print s1 after squeeze(s1,s2) on a line of its own.

Test Cases

· space→ tab↵ newline

Submissions

No submissions yet