#include <stdio.h> main() { char c; // store the character just read in a char, more efficient than int while ((c = getchar()) != EOF) { if (c == '\t') { printf("\\t"); } else if (c == '\\') { printf("\\\\"); } else if (c == '\b') { printf("\\b"); } else putchar(c); } } }