Yes it should - I was concentrating on the backspace thing and not being careful enough about the code.
while((c = getchar()) != EOF) {
if(c == '\t')
printf("\\t");
if(c == '\b')
Shouldn't this be 'else if'? Otherwise, if you encounter a tab, you will print '\t' and then call into the 'else' below after the test for '\b' and print c, which is a tab literal.
- Dan C.