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 in an unambiguous way.
I am not getting how do I test for backspace and I am not sure if I am doing it correctly, please review and give me some feedbacks.
#include <stdio.h>
main() {
int c;
while ((c = getchar()) != EOF) {
if (c == '\t') {
putchar(92);
putchar(116);
} else if (c == '\b') {
putchar(92);
putchar(98);
} else if (c == '\\') {
putchar(92);
putchar(92);
} else {
putchar(c);
}
};
}