[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Book questions





On 09/04/15 13:15, Petter Adsen wrote:
<snip>

I also found the K&R book, "The UNIX Programming Environment" by
Kernighan and Pike, and "UNIX Systems Programming for SVR4" from
O'Reilly. Since I want to learn C I know I need to read the first of
these, but I was wondering how the other two are, if anyone here has
read them.
Hey Petter

The UNIX Programming Environment is a very useful text, for basic UNIX stuff (files, re-direction, pipes etc) and also has decent sections on shell and C programming. There are also sections on yacc and lex (which in the modern world seem to have been replaced by bison and flex)

As has been stated elsewhere in this thread, K&R The C Programming Language is *the* reference text, so well worth it. Not to scare you, but there is so much more to C than just learning the programming language. You will need to also learn about

  * How to compile the software with gcc and also make
* Linking to external libraries (libpcre can be a good one if you also want to have perl regular expressions in your C code)
  * Creating shared libraries with libtool
* If you want to distribute your software, then autoconf will be helpful. This allows you to bundle your software so that users can download the tarball, untar, run ./configure && make && make install

When I started learning C about 2 - 3 years ago, I book I found invaluable was this:

Title:21st Century C
By: Ben Klemens
Publisher:O'Reilly
Media Formats: Print
Print: October 2012
Pages: 296
Print ISBN:978-1-4493-2714-9 | ISBN 10:1-4493-2714-1

The reason being, C has gone through many incantations (K&R, ansi C / ISO C, C99, C11) and this will give you an insight into "modern" C (the C11 standard) which gcc has good support for.

Good luck

Iain


Reply to: