• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Recommended C Books

TheeVagabond

Junior Member
I am about to complete a hybrid course for C programming and feel like it will be passed just barely with a C or B. I feel completely lost. Granted my lack of understanding is my own fault as *typical* drama of the full time working, part time student got the best of me... (for shame!) Just recently I completely botched a project for a tic tac toe board, running out of time trying to figure out how to do a diagonal victory check and tie check. A few things I noticed in class was I only begun to understand things when it was applied in a real life circumstance or I could visually see what an algorithm did. That's just a little background on why (my own fault) am lost.

Despite my mediocre performance in school, I want to know C and learn it. I plan on needing it for the future. C and C++ are my interests. Does anyone know of good starter books on C that I should get, great books that will help me or put me in the right direction? Any help would be greatly appreciated.
 
this book worked for me... Then again, it's more specific toward data structures. Since you seem to be struggling with what algorithms are doing, this might be a good approach for you.

Alternatively, a pure algorithms book might do the trick for you. It'll remove the need to know any actual programming language and will rely on your discrete math and algebra skills.
 
It's hard to argue with the classics:
http://www.amazon.com/C-Progra...&qid=1241548087&sr=1-1
http://www.amazon.com/Structur...&qid=1241548443&sr=1-1


Learning language syntax is usually just the beginning though. Any retard with a high school degree and a keyboard and pump out code. Learning to develop maintainable software can take years and is usually a matter of practice and experience.

As far as tic-tac-toe: Don't bother checking for a tie condition, if no winner is decided and the board is full you have reached a tie.
 
Hmmm... now that I think about it, it's wierd that we don't have any book recommendations for C books on our Book Recommendations thread.

slugg & squatchman, I'm adding your books in there. (If anyone else has any more suggestions, I'll add those in too. I'm watching this thread as well)

-cd
 
I think I learned C from this book or its predecessor, 15 years ago or so. I don't remember enough of it to know whether to recommend it or not.

If you're looking for an algorithms book, though, I strongly recommend Sedgewick's Algorithms in C. Technically, I have the old second edition Pascal version; but what matters is that it has code you can read, good diagrams, and no proofs to get in the way.
 
Originally posted by: Ken g6
I think I learned C from this book or its predecessor, 15 years ago or so. I don't remember enough of it to know whether to recommend it or not.

If you're looking for an algorithms book, though, I strongly recommend Sedgewick's Algorithms in C. Technically, I have the old second edition Pascal version; but what matters is that it has code you can read, good diagrams, and no proofs to get in the way.

Proofs don't get in the way - they separate the men from the boys! 😉
 
I'll certainly second the recommendation for Sedgewick's book.

Dave

Originally posted by: Ken g6
I think I learned C from this book or its predecessor, 15 years ago or so. I don't remember enough of it to know whether to recommend it or not.

If you're looking for an algorithms book, though, I strongly recommend Sedgewick's Algorithms in C. Technically, I have the old second edition Pascal version; but what matters is that it has code you can read, good diagrams, and no proofs to get in the way.

 
Originally posted by: slugg
Proofs don't get in the way - they separate the men from the boys! 😉

What do you guys mean by proofs ? A real-life example or something?

I know what a proof in Mathematics is, but I just can't get my head around to how you can do the same with algorithms...

I found those math proofs fun though. 🙂
 
Proofs are a large part of Computer Science - especially when you start discussing sorting, searching, and other types of algorithms.

You can read quite a bit about it here

Dave

Originally posted by: chronodekar
Originally posted by: slugg
Proofs don't get in the way - they separate the men from the boys! 😉

What do you guys mean by proofs ? A real-life example or something?

I know what a proof in Mathematics is, but I just can't get my head around to how you can do the same with algorithms...

I found those math proofs fun though. 🙂

 
Originally posted by: GodlessAstronomer
I've had excellent results with C Programming: A Modern Approach by K.N. King, and I'm on my way to a solid A in my C/C++ course.

Agreed! I have the first edition of this book and it was actually quite fun. Great book.


Originally posted by: squatchman
Computer Science is essentially applied math.

100% agree! I was a math major, then I saw the light, then switched to Computer Science.

Originally posted by: chronodekar
Originally posted by: slugg
Proofs don't get in the way - they separate the men from the boys! 😉

What do you guys mean by proofs ? A real-life example or something?

I know what a proof in Mathematics is, but I just can't get my head around to how you can do the same with algorithms...

I found those math proofs fun though. 🙂

Yes, it's just that: a mathematical proof! Algorithms have little to do with actual code. It's all math. The code is just a different way to write it down so that computers can execute it.

But yea, you should be able to show proof for any algorithm. Why does a proof matter? Well for one, it validates the algorithm. Not only that, but it abstracts the algorithm from the programming aspect. Finally, it explicitly defines the algorithm so that it may be transferred into code without any ambiguity.
 
Originally posted by: squatchman
Computer Science is essentially applied math.

you can get by without actually being "good" at math as most of the functions have been made already, you just gotta know how to use them and the nuances of the language you are applying them in
 
Originally posted by: LumbergTech
Originally posted by: squatchman
Computer Science is essentially applied math.

you can get by without actually being "good" at math as most of the functions have been made already, you just gotta know how to use them and the nuances of the language you are applying them in

If anything, CS is applied logic, not math. You can be good at logic but suck at math. Hence, you can be a good programmer but have not skills in math.

Though, knowing math will definitely help as there is more then a number of applications that benefit from having a large amount of math knowledge applied to them.
 
I've read about Dining philosophers problem (suggested by nkgreen) and Sorting algorithm (suggested by Apathetic).

I'm getting the gist of things here, (I think), but perhaps it's just me being thick. 🙂

Suppose (in math) we are asked to prove this formula,

(A + B)^2 = A^2 + 2*A*B + B^2

One way is to start from LHS (Left Hand Side) and reach the RHS (Right Hand Side)

LHS = (A + B)^2
= (A + B) * (A + B)
= A^2 + A*B + B*A + B^2
= A^2 + A*B + A*B + B^2 (commutative law)
= A^2 + 2*A*B + B^2
= RHS

Hence proved.

Now, this is a simple example, but it highlights my line of thinking. I can't seem to get my head around to thinking of algorithms in this manner. 😕
 
People tend to forget... LOGIC = ALGEBRA = MATH

And people don't realize just how expansive algebra is. WAY WAY WAY more expansive than any other type of math..
 
Originally posted by: squatchman
Algebra is the Windows Vista of math. Very bloated... lots of tools and doodads.

I'd say its the Unix of the OS world. One, giant, monolithic subject that is rock solid, reliable, and can do anything if you know how to use it. LOL!
 
Originally posted by: slugg
Originally posted by: squatchman
Algebra is the Windows Vista of math. Very bloated... lots of tools and doodads.

I'd say its the Unix of the OS world. One, giant, monolithic subject that is rock solid, reliable, and can do anything if you know how to use it. LOL!

This I agree with. Algebra is a VERY good and rock-solid foundation. (For those who make use of it)
 
Back
Top