By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,798 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,798 IT Pros & Developers. It's quick & easy.

I've read K&R, what now?

P: n/a
I'd like to say I have a basic control of the C language. Is there any
reccomended reading upon completion of K&R?

Are there any projects someone new to C could study/watch over/ and
eventually contribute to in order to get a grip on the development
process and/or expand their knowledge?

Thank you.

May 31 '07 #1
Share this Question
Share on Google+
22 Replies


P: n/a
gi******@gmail.com wrote:
I'd like to say I have a basic control of the C language. Is there any
reccomended reading upon completion of K&R?
Have you gone though the exercises?
Are there any projects someone new to C could study/watch over/ and
eventually contribute to in order to get a grip on the development
process and/or expand their knowledge?
Probably too many to summarise. Have a look on sourceforge, there are
quite a few small projects on the go there.

--
Ian Collins.
May 31 '07 #2

P: n/a
I've gone through most of the exercises, yeah. The only ones I didn't
do were the ones where the solution were immediately obvious.

May 31 '07 #3

P: n/a
On May 31, 3:44 pm, gilli...@gmail.com wrote:
I've gone through most of the exercises, yeah. The only ones I didn't
do were the ones where the solution were immediately obvious.
So you do know every nuances in C ^-^
Maybe you should have a look on computer architecture and assembly to
dig deeper.

May 31 '07 #4

P: n/a
gi******@gmail.com said:
I'd like to say I have a basic control of the C language.
That's good. If you've done most of the exercises, that's actually
amazing.
Is there any reccomended reading upon completion of K&R?
http://www.cpax.org.uk/prg/portable/...s.php#RecBooks
Are there any projects someone new to C could study/watch over/ and
eventually contribute to in order to get a grip on the development
process and/or expand their knowledge?
That's probably a good way to pick up lots of bad habits real fast. I'm
not saying you shouldn't do it, but if I were you I'd keep a close eye
on comp.lang.c for quite a while yet - if K&R is like learning to
drive, clc is a bit like a driving test (although we don't actually
offer certification as such[1]!). We tend to spot *everything* you're
doing wrong, and we write it all down too. It can be a disspiriting
experience at first, but you'll be a better C programmer as a result.
[1] Perhaps we should.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 31 '07 #5

P: n/a
On 31 May 2007 00:03:45 -0700, gi******@gmail.com wrote:
>I'd like to say I have a basic control of the C language. Is there any
reccomended reading upon completion of K&R?
Read it (better study it) again ;-)
>Are there any projects someone new to C could study/watch over/ and
eventually contribute to in order to get a grip on the development
process and/or expand their knowledge?
You should take a look at a real-world C program that is not too large
and written in decent C. JSON-C (http://oss.metaparadigm.com/json-c/)
is a candidate. It implements routines for handling the JSON protocol
(http://www.json.org/). You may start by browsing the source code and
trying to understand at least parts of it, e.g. 'arraylist' or
'linkhash'.

Good luck!
--
Roland Pibinger
"The best software is simple, elegant, and full of drama" - Grady Booch
May 31 '07 #6

P: n/a
Richard Heathfield wrote:
gi******@gmail.com said:
.... snip ...
>
>Are there any projects someone new to C could study/watch over/
and eventually contribute to in order to get a grip on the
development process and/or expand their knowledge?

That's probably a good way to pick up lots of bad habits real fast.
I'm not saying you shouldn't do it, but if I were you I'd keep a
close eye on comp.lang.c for quite a while yet - if K&R is like
learning to drive, clc is a bit like a driving test (although we
don't actually offer certification as such[1]!). We tend to spot
*everything* you're doing wrong, and we write it all down too. It
can be a disspiriting experience at first, but you'll be a better
C programmer as a result.

[1] Perhaps we should.
Probably not. It would be a full time job just separating the
faulty corrections.

The OP can also snoop around my publications, on:

<http://cbfalconer.home.att.net/download/>

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 31 '07 #7

P: n/a
Richard Heathfield wrote:

[Warning: I did post a replay via google, but that one never appeared]
gi******@gmail.com said:
>I'd like to say I have a basic control of the C language.

That's good. If you've done most of the exercises, that's actually
amazing.
>Is there any reccomended reading upon completion of K&R?

http://www.cpax.org.uk/prg/portable/...s.php#RecBooks

OK, I will walk through this list:
1. C Programming: A Modern Approach, K.N.King
2. C: How to Program, 2nd Ed. Deitel, H.M. & Deitel

Comment (1 & 2): These two books after K&R2, shouldn't be needed.
3. The C Programming Language, 2nd Ed. Kernighan & Ritchie.

Comment: N/A. (OP has already read this one)
4. C: A Reference Manual, 4th Ed. Harbison & Steele

Comment: OP don't need H&S now, just use K&R2.
5. The Standard C Library. P.J.Plauger

Comment: I read this one too early myself, and it was too advanced. I
would suggest 2-3 years of C experience first.
6. C Programming FAQs Steve Summit.

Comment: Very useful resource at this stage for OP.
7. ISO/IEC 9899:1999 ISO.

Comment: Latest draft is available online, likely a far too advanced
text for beginners.
8. C Traps and Pitfalls. Andrew Koenig

Comment: Nice little book, not a must read now.
9. Expert C Programming: Deep C Secrets, Peter van der Linden

Comment: Excellent & funny book, but not recommended for beginners.
10. Problem Solving And Program Design In C, 2nd Ed. Hanly & Koffman.

Comment: N/A (I don't have that book)
11. Algorithms in C, 3rd Ed. Robert Sedgewick

Comment: Excellent book, if OP is interested in algorithms
12. C Unleashed, Heathfield, Kirby et al,

Comment: Thick as a brick, with some nice real-world code in it.
Readable after K&R2, and can be used as murder weapon too.
13. Software Solutions in C, ed Dale Schumacher

Comment: N/A
14. Programs and Data Structures in C, Leendert Ammeraal.

Comment: I haven't this book either, but IMO a book on Data Structures
is the natural step after K&R2.
15. Numerical Recipes in C

Comment: Mainly relevant for physics and chemistry students, not the
place to learn C.

That completes the recommendations from Richard H., which lack any
references to platform-dependent coding, if OP is using UNIX/Linux, a
book on POSIX (e.g. Stevens APUE http://www.kohala.com/start/) is much
more useful, than many of the above suggestions.

--
Tor <torust [at] online [dot] no>
May 31 '07 #8

P: n/a
Tor Rustad said:
Richard Heathfield wrote:

[Warning: I did post a replay via google, but that one never appeared]
>gi******@gmail.com said:
>>I'd like to say I have a basic control of the C language.

That's good. If you've done most of the exercises, that's actually
amazing.
>>Is there any reccomended reading upon completion of K&R?

http://www.cpax.org.uk/prg/portable/...s.php#RecBooks


OK, I will walk through this list:
<snip>
>
7. ISO/IEC 9899:1999 ISO.

Comment: Latest draft is available online, likely a far too advanced
text for beginners.
He's hardly a beginner. He's completed almost all the exercises in K&R2!
9. Expert C Programming: Deep C Secrets, Peter van der Linden

Comment: Excellent & funny book, but not recommended for beginners.
Aye. But again, he's not a beginner. Actually, this one is recommended a
lot, but personally I think it's a bit too eccentric to make a good
followup to K&R2. It is a good book, no question about that, but it's
more of a book that you'd read on a long train journey or, say, to
while away an hour or so at a party - the kitchen is a good place for
this, since you can usually find a spare bottle or two of wine.
11. Algorithms in C, 3rd Ed. Robert Sedgewick

Comment: Excellent book, if OP is interested in algorithms
If he isn't, he sure picked a funny career.
13. Software Solutions in C, ed Dale Schumacher

Comment: N/A
Fabulous book. Well worth the trouble it will take to find a copy.

14. Programs and Data Structures in C, Leendert Ammeraal.

Comment: I haven't this book either, but IMO a book on Data Structures
is the natural step after K&R2.
I do have a copy, and it's first-class.
15. Numerical Recipes in C

Comment: Mainly relevant for physics and chemistry students, not the
place to learn C.
Yeah, I ought to strip that off the list, really.
That completes the recommendations from Richard H., which lack any
references to platform-dependent coding, if OP is using UNIX/Linux, a
book on POSIX (e.g. Stevens APUE http://www.kohala.com/start/) is much
more useful, than many of the above suggestions.
Well, this is a platform-independent group. If I were pushed for
platform-specific recommendations, I would start off by saying APUE to
the POSIX people, PW (Petzold, 5th edition ONLY) to the Win32 people,
and UNP to both groups (yes, even the Win32 people, and even though
porting the code from one to the other isn't entirely effortless).

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 31 '07 #9

P: n/a
Is there any reccomended reading upon completion of K&R?

I would also add Writing Solid Code by Steve Maguire.

Michael

May 31 '07 #10

P: n/a
Michael said:
Is there any reccomended reading upon completion of K&R?

I would also add Writing Solid Code by Steve Maguire.
I wouldn't.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 31 '07 #11

P: n/a
Richard Heathfield wrote:
Tor Rustad said:
.... snip ...
>
>That completes the recommendations from Richard H., which lack
any references to platform-dependent coding, if OP is using
UNIX/Linux, a book on POSIX (e.g. Stevens APUE
http://www.kohala.com/start/) is much more useful, than many of
the above suggestions.

Well, this is a platform-independent group. If I were pushed for
platform-specific recommendations, I would start off by saying
APUE to the POSIX people, PW (Petzold, 5th edition ONLY) to the
Win32 people, and UNP to both groups (yes, even the Win32 people,
and even though porting the code from one to the other isn't
entirely effortless).
I note the absence of "Practice of Programming", which I consider
excellent.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 31 '07 #12

P: n/a
CBFalconer said:
Richard Heathfield wrote:
>Tor Rustad said:
... snip ...
>>
>>That completes the recommendations from Richard H., which lack
any references to platform-dependent coding, if OP is using
UNIX/Linux, a book on POSIX (e.g. Stevens APUE
http://www.kohala.com/start/) is much more useful, than many of
the above suggestions.

Well, this is a platform-independent group. If I were pushed for
platform-specific recommendations, I would start off by saying
APUE to the POSIX people, PW (Petzold, 5th edition ONLY) to the
Win32 people, and UNP to both groups (yes, even the Win32 people,
and even though porting the code from one to the other isn't
entirely effortless).

I note the absence of "Practice of Programming", which I consider
excellent.
But it's not about C! :-)

Yes, of course you're right - but my "recommended reading" list is a
list of ***C*** books. If you look carefully at the list on my site,
you will also note the absence of APUE (see above), PW (again, see
above), UNP (ditto), Stevens' "TCP/IP Illustrated" series, TAOCP, "Code
Complete", the Wirth book, Stroustrup, Hofstadter, and the entire
Discworld series, not to mention the Bible and Shakespeare.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 31 '07 #13

P: n/a
Tor Rustad <to********@hotmail.comwrites:
[...]
4. C: A Reference Manual, 4th Ed. Harbison & Steele

Comment: OP don't need H&S now, just use K&R2.
There's a 5th edition of H&S. Unlike K&R2, it covers C99 (and yes, it
clearly distinguishes which features are new in C99). I recommend it
as a reference, as opposed to a tutorial.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
May 31 '07 #14

P: n/a
Richard Heathfield wrote:
CBFalconer said:
.... snip ...
>
>I note the absence of "Practice of Programming", which I consider
excellent.

But it's not about C! :-)
But largely. The association with other languages gives the reader
a good introduction to the general subject of languages. It's
probably closer to on-topic here than 50% of the enquiries.
>
Yes, of course you're right - but my "recommended reading" list is
a list of ***C*** books. If you look carefully at the list on my
site, you will also note the absence of APUE (see above), PW (again,
see above), UNP (ditto), Stevens' "TCP/IP Illustrated" series,
TAOCP, "Code Complete", the Wirth book, Stroustrup, Hofstadter, and
the entire Discworld series, not to mention the Bible and Shakespeare.
How could you leave the Bible and Shakespeare, not to mention the
Koran, off that list? :-)

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 31 '07 #15

P: n/a
Richard Heathfield wrote:
Tor Rustad said:
[...]
>7. ISO/IEC 9899:1999 ISO.

Comment: Latest draft is available online, likely a far too advanced
text for beginners.

He's hardly a beginner. He's completed almost all the exercises in K&R2!
Well done indeed and a very good starting point for OP, but still... at
least for me, it took years before advancing above "beginner". :-/

>11. Algorithms in C, 3rd Ed. Robert Sedgewick

Comment: Excellent book, if OP is interested in algorithms

If he isn't, he sure picked a funny career.
Who says OP has picked a career yet? Not everyone are CS students you
know. :)

Anyway, there are multiple possible paths, OP's interest might be in
Communication, Cryptology, Data Compression, Compiler Design or even
Operating Systems, if so, I'm just saying that it makes sense to
consider C book on such a topic first.

Knuth & Bentley has also some nice books on algorithms.

>14. Programs and Data Structures in C, Leendert Ammeraal.

Comment: I haven't this book either, but IMO a book on Data Structures
is the natural step after K&R2.

I do have a copy, and it's first-class.
OK, I take your word for it. I used "Data Structures Using C" by
Tenenbaum, Langsam & Augenstein, which I can recommended too. However,
by looking at the ACCU reviews, "Advanced C Struct Programming" by John
W.L. Ogilvie, got the highest score of all the C books on data structures.

>That completes the recommendations from Richard H., which lack any
references to platform-dependent coding, if OP is using UNIX/Linux, a
book on POSIX (e.g. Stevens APUE http://www.kohala.com/start/) is much
more useful, than many of the above suggestions.

Well, this is a platform-independent group.
Sure is, still the world consist of more than strictly conforming C
programs. :)
If I were pushed for
platform-specific recommendations, I would start off by saying APUE to
the POSIX people, PW (Petzold, 5th edition ONLY) to the Win32 people,
and UNP to both groups (yes, even the Win32 people, and even though
porting the code from one to the other isn't entirely effortless).
I have not read "Programming Windows" by Petzold, but rather "Advanced
Windows" by Jeffrey Richter, which was sufficient along with the MSDN
doc. I do agree that Stevens UNP is useful for all, even his APUE, won't
hurt the Windows people.

--
Tor <torust [at] online [dot] no>
May 31 '07 #16

P: n/a
Keith Thompson wrote:
Tor Rustad <to********@hotmail.comwrites:
[...]
>4. C: A Reference Manual, 4th Ed. Harbison & Steele

Comment: OP don't need H&S now, just use K&R2.

There's a 5th edition of H&S. Unlike K&R2, it covers C99 (and yes, it
clearly distinguishes which features are new in C99). I recommend it
as a reference, as opposed to a tutorial.
I do have the H&S 5th ed. for reference, but don't see this as the
natural next step for OP, which IMO is rather a good book on data
structures and using the C FAQ.

--
Tor <torust [at] online [dot] no>
May 31 '07 #17

P: n/a
Tor Rustad said:
Richard Heathfield wrote:
>Tor Rustad said:

[...]
>>7. ISO/IEC 9899:1999 ISO.

Comment: Latest draft is available online, likely a far too advanced
text for beginners.

He's hardly a beginner. He's completed almost all the exercises in
K&R2!

Well done indeed and a very good starting point for OP, but still...
at least for me, it took years before advancing above "beginner". :-/
I proceeded quite smoothly and quickly up the ladder to 'expert' - and
then I landed on comp.lang.c, which is one hell of a snake.
>>That completes the recommendations from Richard H., which lack any
references to platform-dependent coding, if OP is using UNIX/Linux,
a book on POSIX (e.g. Stevens APUE http://www.kohala.com/start/) is
much more useful, than many of the above suggestions.

Well, this is a platform-independent group.

Sure is, still the world consist of more than strictly conforming C
programs. :)
Huh? Whatever gave you that idea? ;-)
>
>If I were pushed for
platform-specific recommendations, I would start off by saying APUE
to the POSIX people, PW (Petzold, 5th edition ONLY) to the Win32
people, and UNP to both groups (yes, even the Win32 people, and even
though porting the code from one to the other isn't entirely
effortless).

I have not read "Programming Windows" by Petzold, but rather "Advanced
Windows" by Jeffrey Richter, which was sufficient along with the MSDN
doc.
I, too, have Richter's book, but it's a bit heavy IMHO - Petzold is
gentler, and very thorough. Having said that, his C really sucks. :-)

I do agree that Stevens UNP is useful for all, even his APUE,
won't hurt the Windows people.
That depends on how hard you throw it.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 31 '07 #18

P: n/a
Richard Heathfield wrote:
Tor Rustad said: (referencing a list of recommended texts)
15. Numerical Recipes in C
Comment: Mainly relevant for physics and chemistry students, not the
place to learn C.

Yeah, I ought to strip that off the list, really.
Or, place it on the list of "Decent books that describe
reasonable algorithms, but with extremely poor coding
style and practice." (I haven't looked at it for years,
and perhaps my memory misleads me, but I'm pretty
sure I learned a LOT of bad habits from that book.)

--
William Pursell

Jun 1 '07 #19

P: n/a
Tor Rustad wrote:
Richard Heathfield wrote:
>Tor Rustad said:

[...]
>>14. Programs and Data Structures in C, Leendert Ammeraal.

Comment: I haven't this book either, but IMO a book on Data Structures
is the natural step after K&R2.

I do have a copy, and it's first-class.

OK, I take your word for it. I used "Data Structures Using C" by
Tenenbaum, Langsam & Augenstein, which I can recommended too. However,
by looking at the ACCU reviews, "Advanced C Struct Programming" by John
W.L. Ogilvie, got the highest score of all the C books on data structures.
I just searched Amazon for Ogilvie's book:

http://www.amazon.com/Advanced-Struc.../dp/047151943X

and did remember it when I saw the cover image! LOL, it must be more
than 15 years ago I worked my way through that one.

Not sure if I agree with Francis Glassborow ACCU review as "Highly
Recommended" though, when Tanenbaum only received "Recommended".
However, Glassborow do have point, since you only really *work* your way
through a good book. Ogilvie and Tanenbaum are not really overlapping
books, Ogilvie's book was more about program design, i.e. how to master
real-life projects, i.e. designing and programming bigger and more
complex systems.

--
Tor <torust [at] online [dot] no>
Jun 1 '07 #20

P: n/a
Richard Heathfield wrote:
Tor Rustad said:
>Richard Heathfield wrote:
>I have not read "Programming Windows" by Petzold, but rather "Advanced
Windows" by Jeffrey Richter, which was sufficient along with the MSDN
doc.

I, too, have Richter's book, but it's a bit heavy IMHO - Petzold is
gentler, and very thorough. Having said that, his C really sucks. :-)
Ahh.. so that's where you picked up your ugly looking meassage crackers
then! ;-)

Richter's C code isn't a pleasure to read either, but having one
reference on the Win32 API is sometimes useful.

>I do agree that Stevens UNP is useful for all, even his APUE,
won't hurt the Windows people.

That depends on how hard you throw it.
LOL

--
Tor <torust [at] online [dot] no>
Jun 1 '07 #21

P: n/a
Tor Rustad said:
Richard Heathfield wrote:
>Tor Rustad said:
>>Richard Heathfield wrote:
>>I have not read "Programming Windows" by Petzold, but rather
"Advanced Windows" by Jeffrey Richter, which was sufficient along
with the MSDN doc.

I, too, have Richter's book, but it's a bit heavy IMHO - Petzold is
gentler, and very thorough. Having said that, his C really sucks. :-)

Ahh.. so that's where you picked up your ugly looking meassage
crackers then! ;-)
No, actually I invented those for myself. Like most of my inventions, it
turned out that they were actually *re*-inventions. For the record,
though, I don't think Petzold uses message crackers at all.
Richter's C code isn't a pleasure to read either, but having one
reference on the Win32 API is sometimes useful.
Hmm. Perhaps we're talking about different Jeffery Richters, or perhaps
he wrote two books, both called "Advanced Windows", with radically
different contents. A reference on the Win32 API is certainly something
I would not have called it.

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Jun 1 '07 #22

P: n/a
Richard Heathfield wrote:
Tor Rustad said:
[...]
>Richter's C code isn't a pleasure to read either, but having one
reference on the Win32 API is sometimes useful.

Hmm. Perhaps we're talking about different Jeffery Richters, or perhaps
he wrote two books, both called "Advanced Windows", with radically
different contents. A reference on the Win32 API is certainly something
I would not have called it.
Since the "Programmers Reference Manual" for Win32 API is provided by
MSDN, Richters book (3rd ed.) is just a useful supplement to this, and I
can call it a *guide* if you like... whatever.

--
Tor <torust [at] online [dot] no>
Jun 1 '07 #23

This discussion thread is closed

Replies have been disabled for this discussion.