Jump to ratings and reviews
Rate this book

Practical C Programming

Rate this book
There are lots of introductory C books, but this is the first one that has the no-nonsense, practical approach that has made Nutshell Handbooks® famous.

C programming is more than just getting the syntax right. Style and debugging also play a tremendous part in creating programs that run well and are easy to maintain. This book teaches you not only the mechanics of programming, but also describes how to create programs that are easy to read, debug, and update.

Practical rules are stressed. For example, there are fifteen precedence rules in C (&& comes before || comes before ?:). The practical programmer reduces these to two: Multiplication and division come before addition and subtraction.

Contrary to popular belief, most programmers do not spend most of their time creating code. Most of their time is spent modifying someone else's code. This books shows you how to avoid the all-too-common obfuscated uses of C (and also to recognize these uses when you encounter them in existing programs) and thereby to leave code that the programmer responsible for maintenance does not have to struggle with. Electronic Archaeology, the art of going through someone else's code, is described.

This third edition introduces popular Integrated Development Environments on Windows systems, as well as UNIX programming utilities, and features a large statistics-generating program to pull together the concepts and features in the language.

454 pages, Paperback

First published January 1, 1991

44 people are currently reading
380 people want to read

About the author

Steve Oualline

32 books4 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
67 (26%)
4 stars
80 (31%)
3 stars
75 (29%)
2 stars
27 (10%)
1 star
2 (<1%)
Displaying 1 - 16 of 16 reviews
Profile Image for Stefan Kanev.
125 reviews235 followers
December 6, 2013
This is a beginner C book and unfortunately, not a very good one. It was written in 1997 and it does not age well. I learned C in high school and while I have never used it professionally, I did not learn anything from the book. The style was nice most of the time, but occasionally spoke too much about cursing and killing people, two things strangely associated with C programming. Very early the book reinforces the Waterfall approach to software development, which costs at least one star in my judgement.

It might be an OK book if you are (not completely) new to programming and want to learn C, but I guess there are better ones.
Profile Image for Dean Jones.
27 reviews4 followers
January 12, 2009
Read this book before the K&R book on C. This book really taught me C.
14 reviews2 followers
September 10, 2009
I don't quite like this as much as KR's classic, but it's a great book with a good definition of how pointers work and how to use them, along with the pitfalls and problems you should avoid.
Profile Image for Siewca Zamętu.
1 review
November 19, 2015
It's a great supplement to K&R for absolute beginners. Intermediate and expert programmers won't find anything interesting here. It is also old. Nowadays, noone is interested in MS-DOS, ancient unices or 16bit architectures (maybe except microcontroller programmers). There's still plenty of useful information, even if some of it is outdated.
If K&R was not enough for you, read this book. Keep in mind however, that some things have changed and additional research may be needed to cover modern tools (ie. valgrind, version control systems) or programming techniques (threading, multiprocessing, IPC and many, many more).
17 reviews
June 24, 2018
This is a really light read, the examples are simple and do a great job at driving home the lessons in this book. However some of the time the presumed output of a program doesn't match what the program actually prints (mostly just formatting errors). Either it lacks in the advanced department or there really is no more advanced things to teach, save for third party libraries.
6 reviews1 follower
April 3, 2008
Steve Oualline rocks. Perhaps someday I'll learn enough to appreciate all he teaches in this book.
1 review1 follower
October 24, 2012
A good practical reference for a programmer to get up to date in C syntax and structure
Profile Image for Benjamin Eskola.
71 reviews22 followers
December 2, 2023
It's OK, maybe. Not great.

First of all, it was written as an introduction to programming in general, rather than an introduction to C for experienced programmers; so a lot of time was spent on the underlying concepts rather than their expression in C specifically. As a result I don't think I got much more than a refresher of what I'd picked up from various sources over the years. I can't really blame the book for that, though; it's just intended for something other than I had hoped for. (Though I'm not sure whether it would be a particularly good introduction to programming anyway, quite apart from the questionable choice of C as a first language.)

Actually, what really put me off at first came even before that, in the introduction, where the author mentions that previous editions had been criticised for sexism (insisting on referring to all programmers as 'he'). His response to this is that people should stop being so politically-correct because obviously that's not what he means. Similarly, he says, he has been criticised for racist and violent language, but this is a joke and people should lighten up. I didn't spot the racism, which may have been removed after all in this edition or in one of the sections I skimmed; but the author regularly 'jokingly' recommends violence against co-workers who do not live up to his precepts. I do see that it was intended as a joke but I don't really find it funny enough to go to the effort of defending; your joke went down badly, get over it and move on with your life.

Beyond that I'm not really convinced by his teaching approach and priorities. He includes a chapter on coding style, but places it before he's taught any syntax at all. He goes into excessive detail about comments, which he insists should be used far more frequently than I'd consider useful, for example asserting that one is required with every variable declaration; no manager or lead engineer will allow you to leave this out, he claims, which I have not found to be the case in fifteen years of professional programming. (He includes teachers in that list, and I have to give him that; but I don't think academics are likely to be the best judges of real-world programming requirements.) Similarly, his explanation of function syntax seems to present comments as a necessary part of the language, rather than a stylistic choice. In general, it basically feels like he's unable to distinguish between his subjective (and usually questionable) preferences and objective requirements. Another minor but weird point is that more than once he makes a recommendation (about style or good practice) with the explanation "this doesn't matter in C but is a good habit when you move to C++". I'm not learning C++, I'm learning C. If I wanted to learn C++ I'd have chosen a book on C++ and not a book on C.

His section on the 'programming process' has not really aged well; it's very waterfall-heavy and not really reflective of how I'd expect most modern software teams to work. To some extent he can't be blamed for that — the book is 25 years old — but I also wonder how useful this really is anyway; it's probably too abstract for absolute beginners, and more experienced programmers will already know it (or know otherwise, as the case may be). Similar for the cross-platform sections; at times there are pages and pages of, for example, Makefiles for all the different MS-DOS compilers. It's perhaps inevitable given the variety of platforms in the mid 90s, but perhaps would have been more effective as just a direction to the correct documentation for the platform.

What I found is that I simply don't think I can trust this book. Partly that's because of what seems to me to be the author's poor judgment, and partly it's the age of the book. There have been multiple updates to the C standard since this was published, for which the author obviously can't be blamed; but on the one hand that means that I can't be sure that anything in the book is still best practice (like I/O handling, for example), and on the other I can't even trust that it was actually best practice at the time and not just the author's preference.

Basically can't recommend this at all.
Profile Image for Tom B..
3 reviews
January 10, 2021
I felt the desire to go a bit "old school" and refresh on C. I used it many many moons ago as a student intern at Philips Labs. It was however not just for sentimental reasons: I also recently realized that with the take-off of IoT - driven by 5G hopefully - embedded SW will become more important than it already is: and when you say embedded SW you quickly end up talking C.

I picked up this book because I understood that over-time the K+R book has become a bit "old" and does not reflect the latest best practices in C programming.

I have to admit that I skimmed quite a few parts in the book and I definitely did not do all Exercises. I focused especially on the oddities that set C apart from Java and even higher-level languages like Python: particularly pointers. In that area, the book scores very well in my view: the description of the topic is succinct and transparent.

The book shows its age when it goes all-out "Waterfall methodology" in describing how SW projects should be undertaken.

But it was a nice reminder of how things were in the past before Object-Oriented Programming took over the world. I give it a 3-star rating because I would not discourage others to pick it up - but beware of the book's shortcomings.
Profile Image for Liquidlasagna.
2,901 reviews99 followers
Read
February 8, 2022
Amazon review

Very good, not perfect

The author has many good points about style, many valid. Except that I find his over use of comments unessicary, especially when commenting declarations of variables. Simply unneeded (most of the time) If you name variables correctly.

While I definitely do not subscribe to the idea that hard code to write should be hard code to read.

Some basic literacy, in common variable names such as I or j for integer counters.
I am about Ѕ way though the book, I particularly liked chapter 7 (Programming process).

My only other criticism of this good book, is it doesn't prepare the reader much to some of the common bad conventions and bad habits some people have, and likely will see.

The book is pretty easy to read and it's a good beginner book, if not the preferred beginner book, just mildly over hyped. I learned some new things, a good read.

Chad C. Keep
Profile Image for Bernie4444.
2,465 reviews11 followers
December 25, 2022
Look for a cow on the cover Practical C not C++

Look for a cow on the cover of this book. I bought this book for a C in my UNIX class. The C part is great.

There is hardly a page that does not have an example or enlightening diagram. However, the only reference to applying this to UNIX is in the back where it "Practically" says that there are different versions of UNIX. It never really claimed to be a UNIX book on C. The section on unbuffered I/O has a little more on the UNIX handling of files. Overall, until something better comes along, I am still using this book.
24 reviews2 followers
October 2, 2017
Found this to be a much better "first C book" than K&R. There were a few typos in the code and sometimes new terms were defined after they were used, resulting in me wasting time looking for if I had missed the term previously, but overall the book is direct and clear.
Profile Image for Carter.
597 reviews
February 27, 2019
Another introduction to the C language. I should have checked the table of contents before buying. I guess it is reasonable for what it is but I was looking for something different. I guess also there is already K&R which is the book I learned C from.
1 review
Read
December 10, 2013
ygedukyeflji
This entire review has been hidden because of spoilers.
Displaying 1 - 16 of 16 reviews

Can't find what you're looking for?

Get help and learn more about the design.