title: Backspace can't be detected in linux terminal , K&R 1.10 exercize
body: <p>i was trying to do the execize 1.10 of k&amp;r so this is : </p>
  
  <pre><code>/* 
   * Exercise 1.10
   *
   * 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 tab 
   * and backspaces visible in an unambiguous way.
   *
   */
  #include &lt;stdio.h&gt;
  
  int main()
  {
      int c;
  
      while ((c = getchar()) != EOF) {
          if (c == '\t')
              printf("\\t");
          else if (c == '\b')
              printf("\\b");
          else if (c == '\\')
              printf("\\\\");
          else
              printf("%c", c);
      }
  }
  </code></pre>
  
  <p>If i compile this code with <code>gcc -std=c99 1.10.c -o test</code>
  it doesn't print <code>\b</code> if i use <kbd>Backspace</kbd>. Why? And how I could try to get <code>\b</code> pressing <kbd>Backspace</kbd> in Linux ?</p>
  
  <p>A guy has said me:</p>
  
  <blockquote>
    <p>Your program probably doesn't see that backspace. Terminals buffer by line, by default. So does stdin. Well, stdin's buffering is IDB.</p>
  </blockquote>