Hacker News new | past | comments | ask | show | jobs | submit login

The book is from 1991, almost 20 years ago. There is a lot of outdated information. You should perhaps look for something more recent, that covers C99 and features commonly found on current compilers.



I was given this book for my 15th birthday - it rescued me from Sinclair Basic! It may be old but it's a very readable C tutorial and won't lead people far astray.


Thanks for the heads-up. Is C really that different now that I need to worry about it? I have done some work in C++ before, but that was many years ago and I've grown accustomed to high-level languages...


In essence, it is the same language, just that it evolved considerably since then. There are places where you could really use a more current reference. For example, the book instructs you to define the main function like:

    main(){
      /* ... */
    }
This is considered bad code style for todays standards. It doesn't state the return value (it defaults to int) and it leaves the argument list open (you can pass any number of arguments to the function).

In other places, it puts restrictions that are no longer relevant today. For example, since C99 (and most compilers allowed this long before C99) you can declare variables anywhere inside a block (which is pretty handy), and not just at the beginning of the function.


Its the same, but C99 adds a couple of neat features like boolean types, variable length arrays, variadic macros, inline functions and a lot more.


No it's not that different. GCC still compiles 1978 C.


Good thing I'm using GCC then! Thanks Mahmud!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: