Clan x86

Technical (Development, Security, etc.) => General Programming => Topic started by: Joe on September 17, 2009, 12:49:37 AM

Title: A Book on C: Programming in C
Post by: Joe on September 17, 2009, 12:49:37 AM
I was talking with an instructor about iPhone App development, and we started talking about C, and he recommended this book to me.

QuoteNow in it's fourth edition, A Book on C retains the features that have made it a proven best-selling tutorial and reference on the ANSI C programming language. This edition builds on the many existing strengths of the text to improve, update, and extend the coverage of C, and now includes information on transitioning to Java and C++ from C.

Beginners and professional programmers alike will benefit from the numerous examples and extensive exercises developed to guide readers through each concept. Step-by-step dissections of program code illuminate the correct usage and syntax of C language constructs and reveal the underlying logic of their application. The clarity of exposition and format of the book make it an excellence reference on all aspects of C.

This book really gets into the meat of the language. Chapter 0 is titled "Starting from zero", and it starts out flipping your world upside down, and explains that from this point forward, nothing starts at 1 anymore.  Chapter 1 is "an overview of C", and in a few short pages you really get the whole picture -- you start with ints, move to chars, strings.. then they dump on you pointers, files.. this is a real mans book.

I highly recommend it to anyone who wants to learn C. If you're looking for light reading for a semi-interesting topic, don't bother.
Title: Re: A Book on C: Programming in C
Post by: MyndFyre on September 17, 2009, 01:02:23 AM
Isn't iPhone built in Objective-C which is kind of totally different?
Title: Re: A Book on C: Programming in C
Post by: Joe on September 17, 2009, 01:42:19 AM
Yes, and no.

Yes, iPhone apps are built in Objective-C.

No, it's not totally different.
Title: Re: A Book on C: Programming in C
Post by: warz on September 17, 2009, 01:57:04 AM
It appears that you've found a real programming book. Congrats. Yes, they do exist! I've never seen that book, but I've got a few really good ones regarding XNA that definitely are not light reading. My game programming course, at the moment, is using C++ and DirectX, though. I may be back on the market for a C++ book, sadly.
Title: Re: A Book on C: Programming in C
Post by: Newby on September 17, 2009, 04:38:24 PM
Quote from: Joe on September 17, 2009, 01:42:19 AM
No, it's not totally different.

Uh, yes it is. I've been writing Objective-C on and off over the last few months...

[root setVariable:null];

Is radically different from

root.variable = null;

Same with:

root.subtree.subtree.variable = null;

versus

[root [subtree [subtree setVariable:null]]];

If it wasn't different, they'd have no issue just letting people use C++.

But in short, C and Objective-C are radically different. Any C code works in Obj-C. That is all the similarity there is.

If you want a book for developing for the iPhone, check out Beginning iPhone 3 Development: Exploring the iPhone SDK by Mark/LaMarche. It's really amazing and doesn't bother teaching you the basics (C/Obj-C) and deals strictly with the SDK/iPhone. I didn't know Obj-C but if you have half a brain you can figure out the language as you go.
Title: Re: A Book on C: Programming in C
Post by: Camel on September 18, 2009, 08:25:19 PM
Quote from: MyndFyre on September 17, 2009, 01:02:23 AM
Isn't iPhone built in Objective-C which is kind of totally different?
Yes, but you can write C/C++ if you want.