View Full Version : Learning C programming, C99 or not
marius
June 9th, 2009, 21:00
OK, so it seems like it's time to really learn some C considering how much used the language is in the open source world. When first learning C I want to do it "the right way", if it's possible to say such a thing.
ANSI this, and ANSI that... should it be C89, or would it be OK to go for C99, or would that break portability in some way? I will mainly spend my time coding on BSD, but maybe also on other operating systems. I also have some plans on reading some of the UNIX programming books I see smiling at me over at amazon.com, but I don't think they teach you C, and that's why I need a C book as well.
It seems like most C programming books today use C99, but I could be wrong. I know the book "C Programming Language" by K&R (uses C89?) is very popular, but it's old, and its layout isn't what I would call nice looking. I've also heard some complaints about the language used, and the authors showing of their vocabulary which isn't something that will suit my English skills since that's not my native language.
Any suggestions or recommendations would be highly appreciated!
Brandybuck
June 10th, 2009, 05:50
The big difference is K&R C versus ANSI/ISO C. The differences between C89 and C99 are very minor, and most people never stumble across them. Any C book within the last fifteen years will be more than adequate.
graudeejs
June 10th, 2009, 07:16
I have C/C++ Programmers Reference 3td edition by Herbert Schildt, 2003
I like this reference.
It also mentions differences between C98, C99, C++ (and maybe ANSI, i'm not sure, i don't remember)
There is 4th edition available (If i recall correctly they added little C# in it)
Another quite good book i have is How to program C, i think it's pretty well written, and gives not only understanding how to code C, but also various tips how to improve performance, how to reduce bugs, how to make readable code.... etc
Side note:
Aside from that Advanced programming in the UNIX Environment is waiting it's turn to be read
trev
June 10th, 2009, 14:07
I have C/C++ Programmers Reference 3td edition by Herbert Schildt, 2003
Sorry... I can't let this pass. Every Schildt book I've ever seen has been of the lowest imaginable quality replete with errors perpetuated by the recycling of material from similar previous books by the same author and presumably unchecked. Maybe he's improved in the last decade... though I doubt it.
Now that's out of the way :) I like the O'Reilly published "Practical C Programming" and "Mastering Algorythms with C", not forgetting the quite invaluable "C Pocket Reference" which is an excellent quick reference and one of the more "meaty" pocket guides.
graudeejs
June 10th, 2009, 15:10
Sorry... I can't let this pass. Every Schildt book I've ever seen has been of the lowest imaginable quality replete with errors perpetuated by the recycling of material from similar previous books by the same author and presumably unchecked. Maybe he's improved in the last decade... though I doubt it.
Now that's out of the way :) I like the O'Reilly published "Practical C Programming" and "Mastering Algorythms with C", not forgetting the quite invaluable "C Pocket Reference" which is an excellent quick reference and one of the more "meaty" pocket guides.
My book is translation to Russian... Perhaps it's a little different.
(all my book are translated to Russian. I don't like using e-shops to get books, otherwise all my books would be English)
marius
June 11th, 2009, 22:25
Thank you all for your suggestions. I'm still not sure which book to go for, but I'm checking out every book mentioned here.
Doesn't it matter if I choose a book that uses K&R C, ANSI/ISO C (or C99) when it comes to portability?
phoenix
June 11th, 2009, 23:00
Don't use K&R for anything except learning the history of the language. It's horribly out-dated and no longer used anywhere (that matters). Use/learn ANSI/ISO standard C.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.