Understand backspace (\b) behaviour in C

后端 未结 2 1505
陌清茗
陌清茗 2020-12-10 05:28

This program copy its input to its output, replacing TAB(\\t) by \\t backspace(\\b) by \\b. But here in my code I am una

2条回答
  •  -上瘾入骨i
    2020-12-10 05:50

    If I haven't misinterpreted the question, you may use 'Ctrl-H' to send a backspace. Using trojanfoe's corrected code, when you type:

    vinay^H
    

    It will print:

    vinay\b
    

    ^H means 'Ctrl-H', it's ASCII character #8, which is backspace.

提交回复
热议问题