Jump to ratings and reviews
Rate this book

Programming in C

Rate this book
Learn the C programming language from one of the best. Stephen Kochan's "Programming in C" is thorough with easy-to-follow instructions that are sure to benefit beginning programmers. This book provides readers with practical examples of how the C programming language can be used with small, fast programs, similar to the programming used by large game developers such as Nintendo. If you want a one-stop-source for C programming, this book is it.The book is appropriate for all introductory-to-intermediate courses on programming in the C language, including courses covering C programming for games and small-device platforms. "Programming in C, Third Edition" is a thoroughly revised and updated edition of Steven Kochan's classic C programming tutorial: a book that has helped thousands of students master C over the past twenty years. This edition fully reflects the latest C standard and contains current source code. It has been crafted to help students master C regardless of the platform they intend to use or the applications they intend to create -- including small-device and gaming applications, where C's elegance and speed make it especially valuable.

Kochan begins with the fundamentals, then covers every facet of C language programming: variables, data types, arithmetic expressions, program looping, making decisions, arrays, functions, structures, character strings, pointers, operations on bits, the preprocessors, I/O, and more. Coverage also includes chapters on working with larger programs; debugging programs; and the fundamentals of object-oriented programming. Appendices include a complete language summary, an introduction to the Standard C Library, coverage of compiling and running programs using gcc, common programming mistakes, and more.

543 pages, Paperback

Published January 1, 2004

149 people are currently reading
638 people want to read

About the author

Stephen G. Kochan

42 books16 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
119 (34%)
4 stars
136 (38%)
3 stars
69 (19%)
2 stars
21 (6%)
1 star
4 (1%)
Displaying 1 - 21 of 21 reviews
Profile Image for Rex.
52 reviews6 followers
July 4, 2012
This book is my earliest book on programming. It is definitely a book that I will never forget. I learn my C skills solely on this book. The skills that I learn help me to bootstrap my research and all fun experiment that I want to do.
58 reviews
December 29, 2013
K & R is a challenging book. I'm still not convinced there is enough information in that book to finish the exercises without outside knowledge. I've been looking for another book that is more up to date than K & R and offered a little more explanation about some of the concepts implemented in C.

Kochan's Programming in C isn't it. (And it's twice the length of K & R.)

This book is full of incomplete explanations, misinformation, and runtime errors. Here are just a few:

Kochan claims early in the book that usage of the prefix/postfix operators (++x and x++) "is a matter of personal preference". That statement is, at best, only technically accurate. If you're incrementing a loop, then it usually won't matter. But in most other places you'll have to think carefully about how you use these operators or be prepared to spend a lot of time tracking down bugs. (The proper usage of these operators is so subtle that many other languages, like Ruby, refuse to implement them.) Kochan eventually clarifies their usage, but not until halfway through the book in the middle of the discussion on pointers.

And speaking of pointers, they are used immediately at the beginning of the book. But they are not explained until Chapter 11. Pointers are C's most powerful and most complicated language feature. Explaining their usage really should have been done more carefully.

Several of the exercises have errors in their explanation. If you complete your own program and are left wondering why your answer doesn't match the book, it's probably not your fault. You could check your answers against the url provided in the back of the book, but the site is gone now. It's pretty easy to find an archive of his site, but even the original version only provided answers to odd numbered problems. This is even more annoying because most of the exercises build up on themselves. If you can't get question #2 working, you probably won't be able to solve the remaining exercises.

Contrast that to The Art of Computer Programming, which Kochan sites frequently. Knuth provides answers to the majority of the exercises. (Well of course he does. Donald Knuth is just awesome like that.) Knuth has set the high water mark for technical publications, but many others have followed this example. Learning Perl also includes answers to exercises and detailed explanations of how they arrived at each solution. The authors of that book also do a better job than Kochan of preparing the reader for the "homework".

Programming in C is a good example of a bad problem that has been gnawing at me for some time now: crappy technical writing. Good technical writing should

-include clear, concise explanations.
-include correct code that can be run by the reader and should be presented in a consistent style.
-should present a tool's features in a logical progression.
-include exercises that only require knowledge of material presented by the author
-include answers to those exercises with explanations

I know K & R fails those last two. But that book was written for a different audience, one whom the authors could assume had sufficient background knowledge. And the answers are available; they were just published separately.

The computer industry is still evolving, and the pace has not slowed down. C, in contrast, has not changed much at all. Most of the changes that have been accepted into the language have not yet been implemented by compilers. (At least not if gcc is your benchmark.)

Compared to modern languages, C's feature set is really quite small. There's not a lot you need to learn to start using it. But using it correctly is much more challenging. Compared to modern languages, there is much less room for error.

If you really want to learn C, the only book worth your time is still K & R's The C Programming Language. It's still a difficult read. But it's also still relevant, and more concise and accurate than anything else that's come along. So suck it up and plow through it. It can only make you stronger.

Profile Image for Harry.
4 reviews
July 25, 2014
Nowadays if a practitioner try to learn the C programming language from the inventors book (K&R Ansi edition) he probably will give up.
Old time are gone nowadays out there actually exist a myriad of books (other than on line material tutorials etc)on C. Some of them are here:
http://www.iso-9899.info/wiki/Books

So what text can choose a newcomer as a first try to learn the language? certainly you can avoid those reported here:
http://www.iso-9899.info/wiki/Main_Pa...

Online you can find also excellent material (mostly on University sites) e.g. http://www-ee.eng.hawaii.edu/~tep/EE1...

Regard "Programming in C" book i appreciate Kochan's clear presentation and explanation balance trough more plodding/wordy style(e.g. Deitel & Deitel's "C how to program", SAms "learn C in 21 Days", or most of 'For dummies series' books et similar...) and the more more terse and condensed(K&R)style

I like Stephan's attention about acquiring good programming practices (aka. programming style) he try to impart throughout the book and the warnings he advise to avoid typical C errors ( e.g. use '==' instead of '=' etc).

The text has a tutorial style and (very important IMO} the examples used to introduce new language constructs are not meaningless/trivial as more often one encounter in other texts.

Anyone looking to learn C has almost an easy book to start with and only later take in consideration the K&R (standard ANSI edition) as reference. In my humble opinion that book belong in the set of the pedagogically excellent introductory books on C in our case and i strongly recommend it to everyone newcomer in that particular (IMO recommended to senior programmers) programming language

It's not straightforward find the companion site(although mainly targeted for objective-C exist a little section for C language too plus errata and odd number book's exercises solutions) :

http://classroomm.com/objective-c/ind...


PS:
Last but not least is proposed/used in Harvard's CS50 (a introductory course on computer science)
http://d2o9nyf4hwsci4.cloudfront.net/...

Take a look in another one review here about that book:
http://www.accu.org/index.php?module=...

Ceers
Harry G. K.
Profile Image for James Taylor.
1 review
October 23, 2018
* This is a reprint of my Amazon review of Dec. 8, 2011 *

I recently started programming in C again after not having done so in over a decade, and found that I needed to relearn it. I therefore needed a text at the appropriate level to lead me at my chosen pace.

I'd previously purchased three texts -- The C Programming Language by Kernighan and Richie (the K&R), C Primer Plus by Stephen Prata, and this one, Programming in C by Stephen Kochan -- but I needed to choose one as my main study text. Like Goldilocks, I tried all three texts to find that the K&R was too terse, the Prata was too verbose, but the Kochan was just right, so that's the one I chose.

The Kochan is a well-written text, helping one navigate the vagaries of C with the right level of guidance, but without excessive hand-holding. Consequently, readers are often exposed to reasonably advanced topics early on in a cursory manner, as preparation for a more advanced treatment later in the text.

The text not only covers syntax, but provides clear explanations of usage, accompanied by appropriate examples to further illuminate the concepts. Sometimes, however, readers are expected to connect the dots, but given the logical structure of the text, this serves to enhance learning.

The pace of the Kochan is more relaxed than that of the frenzied K&R, but brisker than that of the soporific Prata. This pace is appropriate for beginning to intermediate readers. Absolute beginners will probably opt for the hand-holding of the Prata, while advanced readers will almost-certainly prefer the K&R.

My only gripe with this text is the absence of answers to the exercises. No answers are provided in the text. However, answers can be found on Stephen Kochan's new website at [...], but only to odd-numbered questions. He says this was a compromise between the demands of teachers, who wanted no answers, and students, who wanted all answers provided.

As a side note, I also bought a Kindle copy of this book as a complement to the printed text so that my text could accompany me wherever I go. I'm thoroughly enjoying this book, and I highly recommend it.
3 reviews
March 5, 2018
I find it nice that the author tries to teach C using examples, but the problem is most of the time the concept of the examples are so complex that you'd end up spending more time trying to understand the example itself than to understand the code.
Profile Image for Trenton.
35 reviews
September 2, 2021
I'm still referring to this book. I've bookmarks, highlighting, underlining, etc.
Profile Image for Lisa Kucharski.
1,040 reviews
September 7, 2016
To say I really liked this book isn't quite accurate. It was a very informative book, and it was assigned reading for the CS50 course. (I'm still slogging through the course) but the book along with the other recommended read, is very useful in understanding C programming. I would say this particular book is very detailed and methodical in approach. It can be a bit overwhelming in terms of the dearth of information given. I would say that it takes you to a point to give you a basic understanding of the language but you would certainly need to learn more to expand this.

The one good thing about learning about C is that it is a couple levels over binary (I think) and so you are learning a lower level programming language which more current ones are built on top. So you get a decent grasp of how to create functions, deal with arrays, and the start of creating header files etc... You will not learn everything and will still need to supplement your knowledge but a solid book that I refer to often while coding.
Profile Image for Alison Van Arsdel.
19 reviews2 followers
January 4, 2012
This was for a class and I didn't reference the book much. When I did I found some helpful information. The teacher was teaching differently than how the book was formatted, so it was not the best for my particular class. But I made an A, so theirs that. If I were self teaching I may find the book helpful.
Profile Image for Dae.
43 reviews3 followers
August 16, 2014
A very dense book with a lot of information. I would say for this reason it's excellent and I would give it a higher rating but for a beginner learning the C language it's ineffective and it left me more confused than anything else. I'm most certainly going to keep it as a reference and as I enhance my skills I'll come back to it.
1 review2 followers
November 13, 2014
This was my first book on C and it taught a lot of good concepts. Although there are a few things (like pointers) that could have been explained with more detail it has quite a bit of detail. I would recommend this book to anyone trying to learn C, but they should already know at least one other programming language.
Profile Image for Nathan Powell.
24 reviews
Read
December 5, 2010
Reading this book via Safari Books Online. Lots of things I already know, but lots I do not. I didn't finish this book, but I don't usually "finish" technical books.
41 reviews5 followers
November 24, 2010
Pretty good overview of the C language and procedural programming in general. Recommended.
Profile Image for Rami Burpee.
23 reviews1 follower
March 8, 2013
Good information, but found this book very difficult to read. too dry for me
Profile Image for Muhammad.
5 reviews1 follower
April 22, 2017
A very good detailed reference for learning the C language.
Displaying 1 - 21 of 21 reviews

Can't find what you're looking for?

Get help and learn more about the design.