Joke Collection Website - Public benefit messages - Regarding the output of backspace symbols, why can't I output \b this program? How should I enter it?

Regarding the output of backspace symbols, why can't I output \b this program? How should I enter it?

int c;

This is an integer type. It is wrong for you to compare integer with character.

The solution is changed to char c (0);

The second question:

You entered \ tThere are two characters in the keyboard buffer, one is \ and the other is t, so the first loop encounters \

At this time, two \ \ will be printed. The word \ "will appear on the screen. The next loop will encounter T. Obviously, if there is no match, T will be output directly.

So the whole result is \\t ". Is this what you saw?