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

Re: Learn C



Ben-Nes Michael wrote:

> Well i did relay meant to K&R but just because someone told me
> that if i want to start with C on linux that what i need to learn.

As is stated in their _2nd_edition_, (K&R 2nd edition) = (ANSI C).
Now ANSI C is a standard that is OS+machine indepenednt, so that
the same ANSI C source program can be compiled, linked and ran on 
any machine that has the proper tools (compiler, linker and loader for
that specific OS+processor). From this one can conclude that ANSI 
C doesn't deal with processes, HW interface and the like.
So, if you want to learn C so that you could write a program that will
run on linux, K&R 2nd edition is a possible book.
However, I think that by "C on linux" you ment (C + linux system calls).
                                                ^^^^^^^^^^^^^^^^^^^^^^^
Well, puting it this way, K&R 2nd edition is certainly not enough.
Perhaps it is the first and fundamental step, but its certainly won't
do,
because, as I said before, ANSI C doesn't deal with the OS specific 
things. Personaly, I can't tell a good resource for the "on linux" part.
Perhaps the kernel hackers guide from the LDP will do.

And 2 more comments, if I may:
1) I think that the 2 or 3 figure number of commands that were
mentioned in one of the responces to your posting mostly refer to the
"on linux" part.
2) Although the previous comment leaves me with a seemingly easy 
task, and altough K&R 2nd is only 272 pages, each less then A4 and 
including about 90 pages of appendices and index, I think that C is
not an easy language.
3) I would also consider learning to write shell scripts and Perl as
part
of the "on linux" part.

Some more references that I can, and can not, write are:
1) There is a learning guide by the Open University that tries to put
more light on the short and soemtimes very extensive explantions of 
K&R 2nd edition. and in order to do that it is arranged by the same
subjects as K&R 2nd edition is arranged.
2) As you have noticed, nither me nor the other members of the
group have supplied (yet) an online resource about C. I didn't do it
becuase I don't know one. Have you tried the search engines and/or 
followed some links in linux-il home page ? If you'll find some online
resources, I would like to ask you to notify me about them.


Follow-Ups: