Graphical Explanation

This code does 9 things:

  1. First, it declares some variables c and old_c,
  2. Then it reads input from the keyboard into c.
  3. After that, it checks to see if old_c is and c is not .
  4. If so, it prints a space and the character last pressed.
  5. Otherwise, it just prints the character last pressed.
  6. Then, old_c is set to c.
  7. Jump to 2 until input is stopped (usually with CTRL+D or the enter key)
  8. It then loads the return value (0, in this case),
  9. and it exits with that return value.

Leave a Comment