PDA

View Full Version : a good starting place for learning C



Dustin2128
September 3rd, 2010, 01:23 AM
I've been experimenting around with different programing languages for a few years, and I figured that at some point I'd have to learn C, seeing as its one of the most widely used programing languages.... ever. Basically I've only ever used the highest level programing languages, the ones where hello world is
print "Hello, world!\n". Can anyone recommend a free book or guide for a beginner? Also: C or C++?

whiskeylover
September 3rd, 2010, 01:30 AM
I learnt C back in 1995 using Aaron Tenenbaum's book on programming with Turbo C. I can't find it anymore on Amazon.

But this book looks good
http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_1?s=books&ie=UTF8&qid=1283473873&sr=1-1

Its by Dennis Ritchie, the creator of C.

schauerlich
September 3rd, 2010, 01:43 AM
http://ubuntuforums.org/forumdisplay.php?f=39
http://ubuntuforums.org/showthread.php?t=333867
http://ubuntuforums.org/showpost.php?p=2045086



Also: C or C++?


Start with C, learn C++ if you're masochistic.

lolzywut
September 3rd, 2010, 01:49 AM
I find C++ better all together but if you plan to learn C and then C++ you should just learn C++ first otherwise you'll just be un-learning everything you learned

schauerlich
September 3rd, 2010, 01:50 AM
I find C++ better all together but if you plan to learn C and then C++ you should just learn C++ first otherwise you'll just be un-learning everything you learned

Not really. Sure, you'll probably not use stdio.h once you learn iostream, but there's a lot of C stuff that's still important in C++, low level details you're forced to deal with. One of the reasons no one likes C++...

Random_Dude
September 3rd, 2010, 01:52 AM
I've only had one course of programing, and it was C.

I'm trying to learn C++ thought the tutorial in cplusplus.com: http://www.cplusplus.com/doc/tutorial

So far it's not too hard, I'm only in the basics of C++ and it has a lot of similarities with C.

Good luck. :cool:

Dustin2128
September 3rd, 2010, 01:57 AM
I learnt C back in 1995 using Aaron Tenenbaum's book on programming with Turbo C. I can't find it anymore on Amazon.

But this book looks good
http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_1?s=books&ie=UTF8&qid=1283473873&sr=1-1

Its by Dennis Ritchie, the creator of C.
Hm, thanks for the link but do you know of any free books? I'm broke...

Bachstelze
September 3rd, 2010, 02:31 AM
Hm, thanks for the link but do you know of any free books? I'm broke...

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

But please buy the book as soon as you can. Best 30 bucks you will ever spend.

Dustin2128
September 4th, 2010, 02:03 AM
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-087-practical-programming-in-c-january-iap-2010/

But please buy the book as soon as you can. Best 30 bucks you will ever spend.
I very well might; is it written with the intent to teach people new to the more.. verbose languages, or to teach someone who uses COBOL? Still, 30$ is just a bit steep for a paperback...

valbaca
September 4th, 2010, 02:27 AM
I very well might; is it written with the intent to teach people new to the more.. verbose languages, or to teach someone who uses COBOL? Still, 30$ is just a bit steep for a paperback...
K&R C is THE BOOK ON C.
Buy it now (http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_1?ie=UTF8&s=books&qid=1283563123&sr=8-1).
Seriously, Now (http://product.half.ebay.com/The-C-Programming-Language_W0QQprZ67113QQtgZinfo).
If any programmer's (book) library was burning down, this would be one of the first books they would try to save.

If you want some fun, tractable ways to try out your new C superpowers, try out Project Euler (http://projecteuler.net/)
The first problems should be easy enough that you're using it mostly as a way to learn C syntax, while the harder problems will start to challenge your understanding of C.

Bachstelze
September 4th, 2010, 02:35 AM
I very well might; is it written with the intent to teach people new to the more.. verbose languages, or to teach someone who uses COBOL? Still, 30$ is just a bit steep for a paperback...

The onyl real prerequisite is that you need to be familiar with programming concepts (variables, functions, etc.) because it only explains them very briefly. Basically, it's written with the intent of teching C to those who already have an experience of programming, regardless of the language.

sprocket10
September 4th, 2010, 03:23 AM
I'm learning C this semester at school. I've had fortran in undergrad, which is making this easy to learn. So far, no probs. Our classbook is this one:

http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_1?ie=UTF8&s=books&qid=1283566909&sr=8-1

The book seems to be great so far. And it can be found online (pdf) free in many places if you dig around. Good Luck!

Dustin2128
September 4th, 2010, 03:44 AM
The onyl real prerequisite is that you need to be familiar with programming concepts (variables, functions, etc.) because it only explains them very briefly. Basically, it's written with the intent of teching C to those who already have an experience of programming, regardless of the language.
Sounds good to me. I think I'll look on ebay now to see if I can get a good deal...

Bachstelze
September 4th, 2010, 03:49 AM
Sounds good to me. I think I'll look on ebay now to see if I can get a good deal...

You can very well learn C without it, mind. I haven't looked closely at the course on MIT's OCW, but I would be surprised if it was bad. The K&R book is an excellent reference, though, it's always good to have it at hand even when you're an experienced C programmer. Basuically, you don't have to buy it now, but do it at some point.