Good book to learn C

Thread Tools Search this Thread
Top Forums Programming Good book to learn C
# 1  
Old 06-26-2011
Good book to learn C

I'd like to learn C but I wanted to ask if anyone knows of a good book to start with. I came across some folks who said the best one is 'The C programming language, second edition' but some reviews said that it's not for beginners. I am learning Java and UNIX on my Mac and am familiar with programming, but I still consider myself a novice (I'm learning for fun and the intellectual exercise).

So if this book isn't the right one, what else can you recommend? And while I'm here, I thought that OS X came with a c compiler. Is that correct? I tried to search the man pages for the proper command, but couldn't find anything.

If this is not the proper forum for this post, I apologize. I wasn't sure where it ought to go, and whoever's the moderator, feel free to move it if necessary.
# 2  
Old 06-26-2011
'The C programming language, second edition' -- YES!

It can be terse, but if you have a programming background it shouldn't be impossible. I learned C using the first ed many years ago. In my opinion it's all you need.
# 3  
Old 06-26-2011
I second agama's opinion. Kernighan and Ritchie's The C Programming Language is a fine way to start. I learned C from the yellowing 2nd edition copy that I have right here.

From the back cover: "C is not a big language, and it is not well served by a big book." The main section of the book is only 189 pages (followed by reference material). Compared to 1000+ page programming tomes common today, this is remarkably brief.

This book will give you a solid understanding of the ANSI C language (C89 to be precise) and its standard library. Nothing more. It does not deal with kernel system call interfaces, compiler/toolchain instructions, etc, which is a good thing in my opinion. Because it concentrates on C, it has aged quite well.

The book uses a very clear writing style, so you should be able to digest the dense areas agama mentioned. Working through the provided exercises will help you here.

If you do decide to use K&R, make sure it's the 2nd Edition; using someone's 1st edition will teach you an older, pre-ANSI dialect that you'll only encounter in geriatric code (no offense, old timers Smilie).

Whichever book you choose, once you've finished it and have spent some time hacking with C, you may want to peruse comp.lang.c Frequently Asked Questions and see how well you do with their questions. It'll help reinforce what you've learned and will probably teach you quite a few things regarding commonplace mistakes and unfounded assumptions.

Regards and good luck,
# 4  
Old 06-26-2011
There is a good selection of books:
The Definitive C Book Guide and List - Stack Overflow
# 5  
Old 06-27-2011
The C Programming Language - Second Edition By K&R

is where I have started, really a good book, provided you should do some research on examples rather just going trough them.
# 6  
Old 06-27-2011
Thanks to you all. I think I'll start with that book. But I was wondering if any of you could also tell me if OS X comes with a C compiler, and if not, do you know where I could get one?
# 7  
Old 06-27-2011
You have plenty of choices. gcc. gcc frontend feeding llvm backend. clang. I have access to an old OS X 10.4 (Tiger) machine and it came with an Apple build of gcc.

Some more info on compilers for Snow Leopard: Mac OS X 10.6 Snow Leopard: the Ars Technica review

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need a good book to learn UNIX Shell Scripting

I'm going to be starting a job in a month or so that I need to brush up on my Unix shell scripting skills. About 15 years ago, I took a college class for Unix shell scripting. I would like to find a good college book again, rather than just going to Amazon and just buying anything. This is... (2 Replies)
Discussion started by: dorlow
2 Replies

2. Programming

Can u tell me an good e-book to learn "C"

Actually I know bit of C++ and Java & C# for a extend. But when I have tried to go through some online exams of C++, I have found out that there's a lot for me to learn in C++ also. And as I Believe, most of the things are the once that C++, got from C. Actually I'm good with those OOP concepts... (3 Replies)
Discussion started by: Nohim Ys
3 Replies

3. What is on Your Mind?

Book to learn Perl

Hi guys, which book are you raccomand to start learn Perl from the ground ? (1 Reply)
Discussion started by: solaris_user
1 Replies

4. UNIX for Dummies Questions & Answers

What is the best book to learn linux kernel?

I'm looking for a book to learn Linux Kernel Now I got a basic C and operating system concept Thanks (1 Reply)
Discussion started by: Runicer
1 Replies

5. UNIX for Dummies Questions & Answers

Best book to learn UNIX from the begining

What is the Best book to learn UNIX from the begining? am really a beginner and no nothing about UNIX, so what are the track that i have to trace in order to be a professional in UNIX and scripting? What are the best books to learn it and what are the certificates such as CCNA in networks... (5 Replies)
Discussion started by: eng.pirlo
5 Replies

6. UNIX for Dummies Questions & Answers

good book to learn korn shell scripting

which is a gud book to learn advanced korn shell scripting? i know the basic shell scripting (1 Reply)
Discussion started by: shishirkotkar
1 Replies

7. UNIX for Dummies Questions & Answers

Recommended book to learn about unix administration?

My knowledge is weak in understanding NIS servers, setting up user accounts, mounting network file systems, clearing stale NFS handles, those sorts of things that I encounter but my IT server team handles. Can anyone recommend a good book on the subject? Something to demystify mount points,... (1 Reply)
Discussion started by: srhadden
1 Replies

8. Shell Programming and Scripting

Any book to learn perl scripting

Hi, Please suggest me any good book to learn pearl scripting. Thanks in advance !!!!:) (5 Replies)
Discussion started by: vkvishwakarma6
5 Replies

9. Programming

book to learn pro c\c++

can any one help me and told me about a good books to learn 1- pro c/c++ under unix 2- programming network using c under unix thnx in advance. (1 Reply)
Discussion started by: kazanoova2
1 Replies

10. Linux

Looking for a good book to learn LINUX

I have just transferred from an mainframe DB2 area to an area that uses LINUX. Any suggestions for a good book to buy for learning LINUX? (1 Reply)
Discussion started by: bigdawg
1 Replies
Login or Register to Ask a Question