Activity for Chris Chadwick

  • Chris Chadwick Chris Chadwick posted a comment on discussion Help

    Thanks, Doug - that makes sense. I'll check out those functions in conio. Cheers Chris

  • Chris Chadwick Chris Chadwick posted a comment on discussion Help

    Thanks for your reply, Kai. I had already seen the page you linked to, when I was looking for an answer. It doesn't mention anything about echoing input to the output, though. I think I've just misunderstood how getchar() operates. I thought it was purely an input function, with putchar() being the output equivalent. Still wondering why backspace doesn't seem to be recognized by the code, though. Any idea? Thanks Chris

  • Chris Chadwick Chris Chadwick posted a comment on discussion Help

    Hi I haven't done any C coding in many years, so am reading through my Kernighan & Ritchie book again, to fully re-aquaint myself with it. One exercise is to write a program using getchar() to get keyboard input, and print it to the screen/stdout, replacing all tab, space and backspace characters with their escape sequence representations. I can't seem to get the following code to behave as expected. Firstly, getchar() seems to be echoing input to the screen without me specifically outputting it...

1