PDA

View Full Version : Any suggestoins for learning C?



stamatiou
June 25th, 2011, 08:02 PM
I have bought the C Programming Language 2nd Edition by K&R but sometimes it is very diffficult for me to understand... I have learnt also Python and PHP and I would like to hear any recomendation on tutorials or books or even videos for learning C from the beginning.... Thank you very much!

boast
June 25th, 2011, 08:11 PM
I found that book to be pretty good. But then again I had already learned Java in school, and had read a book in C++, so I could sort of tell that the way the book was written was intended for those that already knew the concepts and basic of programming and just needed to learn the syntax and ideology.

Since you already know python and PHP, I'm surprised you had difficulty with the book. Was it any chapter specifically in the book, or the just the way everything is presented?

Bachstelze
June 25th, 2011, 08:17 PM
K&R is a good reference book, but a bit dry for learning, because it passes very quickly on some key aspects, like memory management. There is a C course available on MIT's OpenCourseWare, I haven't looked at it but it's probably worth a try.

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-087-practical-programming-in-c-january-iap-2010/

haqking
June 25th, 2011, 08:25 PM
I have bought the C Programming Language 2nd Edition by K&R but sometimes it is very diffficult for me to understand... I have learnt also Python and PHP and I would like to hear any recomendation on tutorials or books or even videos for learning C from the beginning.... Thank you very much!

great book, there is a .torrent out there for a video tutorial that uses it as a companion and very good, i will dig it out and PM you the link

however you might want to check this out for now:

http://www.youtube.com/user/thenewboston#g/c/78280D6BE6F05D34

slavik
June 26th, 2011, 08:42 AM
if you don't understand something in the book, reference the passage and ask a question.

kevinharper
August 13th, 2011, 01:48 AM
@Bachstelze Awesome suggestion! Just checked out their website and bookmarked a ton of useful C and Java URLs.

This book just really made me mad, man.

I finished a chapter on input/output and in the self test they asked to write a program that would accept 30 chars or less but truncate string if an '*' was entered.

The solution they provided ONLY works if string is exactly 30 chars long (even if there is an * somewhere in there). I ticked me off because what I wrote was about twice as long as what they had and theirs didn't quite like they asked.

haqking
August 13th, 2011, 01:51 AM
@Bachstelze Awesome suggestion! Just checked out their website and bookmarked a ton of useful C and Java URLs.

This book just really made me mad, man.

I finished a chapter on input/output and in the self test they asked to write a program that would accept 30 chars or less but truncate string if an '*' was entered.

The solution they provided ONLY works if string is exactly 30 chars long (even if there is an * somewhere in there). I ticked me off because what I wrote was about twice as long as what they had and theirs didn't quite like they asked.


been many years since i looked at it but there is an errata available:

http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html

incase it was an error

Bachstelze
August 13th, 2011, 02:01 AM
Unless I missed something, kevinharper's book is not K&R. There is no such exercise in K&R, and they don't provide solutions.

kevinharper
August 13th, 2011, 02:45 AM
Yes.. you are right... Sorry. Should have elaborated. It is NOT K&R.

I was referring to that flunkie, wanna-be book that you once told me to recycle. After this last occurrence, I think I might just do that.

haqking
August 13th, 2011, 11:01 AM
Unless I missed something, kevinharper's book is not K&R. There is no such exercise in K&R, and they don't provide solutions.

ahh gotcha.

But however you can get answers for K&R http://www.amazon.com/Answer-Book-Solutions-Exercises-Programming/dp/0131096532/ref=pd_sim_b_1