K&R C Exercise 3-2: escape — Convert Special Characters to Escape Sequences
Exercise 3-2. Write a function escape(s,t) that converts characters like newline and tab into visible escape sequences like \n and \t as it copies the string t to s. Use a switch. Write a function for the other direction as well, converting escape sequences into the real characters. Two functions walking their input strings character …