Any tips for learning C

Hi
i would like to learn C as a modern language.
Does anyone know a good book or something else useful?
With gratitude
0459

Take a look at: http://iso-9899.info/wiki/Books

You can do problems of varying levels of difficulty at Code Eval. To really learn, you have to code code code, and having problems already laid out can help with that.

thank you for the information, code code code it is then

Read the bible

4 Likes

Second edition please.

1 Like

Just learn C++ it's basically an improvement on c and is used more often...alot of the same principles carry over minus the object oriented stuff. Heres a book by the creator

start with .net or C++

in general most devices use these two languages thanks to microsoft's IDE

Debatable.

2 Likes

C is a subset of C++ and many improvements that came with C++ have been back ported to C....

but yea.... C is still very relevant.

Also, here's my favorite reference material for C/C++,
http://www.cplusplus.com/doc/tutorial/

1 Like

http://c.learncodethehardway.org

What I used and I used the tutorial http://www.cplusplus.com/doc/tutorial/

Send me questions , I want to see if I really did waste my time.
Although C++ is more interesting.

I really don't like and I don't reccomend that book. There are way better resources both free and paid.

As of why it's bad, read here: http://hentenaar.com/dont-learn-c-the-wrong-way

A great comment from one of the people there. I think it's a great book and the fact that it is free is even better.

Let me just point you to the couple of following facts I really do like about this book:
- the author is asking reader to play with the code on his/her own, to
break it down and look for the errors and ways how to fix it
- the author is prompting reader to leave everything as is and go and search
for many other materials/topics outside of the book while most writers
- the author is offering/outlining exercises which are not so boring and
stupid like in many other books; for instance "try to print the value of
variable foo", etc.
- I do like author is offering/showing some useful tools
- I do appreciate fact that the author does not use any IDE, but just
plain text editor as well as compiler directly from command line

A lot of the things that the author of the article says are nitpickings.

He also seems to be a fan of a single book by K&R and to be honest that book is extremely hard for any beginner to start with. It makes understanding and using C hard and not learning how it works the hard way.

1 Like

What?

Details in C are important. You have no idea how many times your programs behaves differently, just because you forgot a little detail or just because you thought something worked that way and then it didn't. C is full of traps, especially when you deal with implementation defined behaviours.

The author of LCTHW seems to hate K&R2. Learning how C really works is hard, not impossible, but hard.

That being said I don't find K&R2 to be a particularly difficult book. But we're all different. There are plenty of other books out there, like A Book on C: Programming in C (4th Edition) by Al Kelley and Ira Pohl, great book, full of exercises, like the ones you have to spot the error, explain it and fix it. Plus it pays attention to details. If you don't want to buy a book written in 1998 because "it's old and not relevant" (which is not true), C Programming: A Modern Approach, by King is great too.

1 Like

Read _the bible_
Do the tutorials
code code code
got it

thanks guys and girls

Coincidentally, Jeff Atwood posted a whole bunch of "learn programming" games in a blog post. Some of them seem to let you use what ever language you want.

Go over that code and understand it. This is what an earlier version of kdb+/k (arguably one of the best column wise databases out there) was based on