Thread: back to basics kernigan and ritchie book

  1. #16
    Registered User
    Join Date
    Apr 2019
    Posts
    662
    Quote Originally Posted by gaxio View Post
    You're having terminal problems again. If you type a backspace, the terminal driver will remove the last buffered character. In most terminals to type a literal backspace and send it to the program along with the other text, you can try Ctrl-V backspace (the key, don't type backspace). This is if you're on Linux or similar, though. If you're on Windows, I have no idea.

    Your program looks fine, though. I wouldn't worry about this, it's a bit of a strange thing to encounter a backspace character in your input.
    thanks that method worked for me.

    ill give up on this book as it seems to expect different results to what i get
    many thanks for all the replys
    coop

  2. #17
    Registered User
    Join Date
    Apr 2019
    Posts
    62
    You have to remember that that book is written in the 70s. it's been updated once that I know of, but some of the specifics like the Ctrl-D and these terminal issues you're running into are UNIX-specific stuff you won't see on Windows, for example. It's fine, just ignore these inconsistencies, it's a platform-specific issue you're having and doesn't affect the C language at all. It's like if you ran into instructions to "click the start button" but you're on a Macintosh, it's just not a big deal.

    However, and I think I touched on this in a previous reply, learning from The C Programming Language can be difficult. It expects you to read a short passage about a feature and immediately do battle with the compiler to learn how to really use it. This type of trial by fire learning is great for people who already have some programming experience and don't want to get bogged down in a lot of pages, but for someone trying to learn how to program and learn C at the same time it can be like pulling teeth. I recommend either sticking with it or getting the K. N. King book.

    The K. N. King book takes a different approach. It takes its time explaining things, but then it goes on to do a faux Q&A of a student asking questions which is really useful. Then the chapters end with a series of exercises and programming projects that do their best to ease you into these new features. Do every one of these and try not to get frustrated. Google for your problems, read, ask questions. While the K. N. King book is probably better suited for you, you're still going to get stuck sometimes just like you are with The C Programming Language. This is normal. This is okay. Work through it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem from book The C Programming Language by Ritchie
    By Thomas Elder in forum C Programming
    Replies: 5
    Last Post: 12-21-2016, 01:54 PM
  2. Kerninghan and Ritchie book, comments or reviews?
    By Terrance in forum Programming Book and Product Reviews
    Replies: 3
    Last Post: 11-08-2016, 02:56 AM
  3. Kernigan and Ritchie Exercise 5-11
    By coder222 in forum C Programming
    Replies: 2
    Last Post: 11-26-2015, 02:40 PM
  4. Kernigan and Ritchie Book Question!
    By Matus in forum C Programming
    Replies: 10
    Last Post: 11-06-2008, 11:58 AM
  5. Newbie question: Kernighan-Ritchie C book- problem
    By plutonas in forum C Programming
    Replies: 2
    Last Post: 06-29-2005, 12:50 PM

Tags for this Thread