K&R C Exercise 1-10: Make Tabs and Backspaces Visible
Exercise 1-10. Write a program to copy its input to its output, replacing each tab by t, each backspace by b, and each backslash by \. This makes tabs and backspaces visible. Approach The exercise is deceptively simple to state but teaches something subtle about C: the difference between a character’s value in the program …