Jump to ratings and reviews
Rate this book

Effective C: An Introduction to Professional C Programming

Rate this book
A detailed introduction to the C programming language for experienced programmers.The world runs on code written in the C programming language, yet most schools begin the curriculum with Python or Java. Effective C bridges this gap and brings C into the modern era--covering the modern C17 Standard as well as potential C2x features. With the aid of this instant classic, you'll soon be writing professional, portable, and secure C programs to power robust systems and solve real-world problems.Robert C. Seacord introduces C and the C Standard Library while addressing best practices, common errors, and open debates in the C community. Developed together with other C Standards committee experts, Effective C will teach you how to debug, test, and analyze C programs. You'll benefit from Seacord's concise explanations of C language constructs and behaviors, and from his 40 years of coding experience.You'll to identify and handle undefined behavior in a C programThe range and representations of integers and floating-point valuesHow dynamic memory allocation works and how to use nonstandard functionsHow to use character encodings and typesHow to perform I/O with terminals and filesystems using C Standard streams and POSIX file descriptorsHow to understand the C compiler's translation phases and the role of the preprocessorHow to test, debug, and analyze C programsEffective C will teach you how to write professional, secure, and portable C code that will stand the test of time and help strengthen the foundation of the computing world.

273 pages, Kindle Edition

Published August 11, 2020

127 people are currently reading
316 people want to read

About the author

Robert C. Seacord

11 books9 followers
Robert C. Seacord is an American computer security specialist and writer. He is the author of books on computer security, legacy system modernization, and component-based software engineering.

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
44 (32%)
4 stars
42 (31%)
3 stars
36 (26%)
2 stars
9 (6%)
1 star
3 (2%)
Displaying 1 - 19 of 19 reviews
Profile Image for Arun.
211 reviews67 followers
December 16, 2020
Finally a book has arrived that is part of the "Effective x" category of books, for a language that needed it the most. Added bonus is that the author is one of the members of the C standards committee so he must know what he is talking about.

There are tons of bad books on C programming in the market and this book will do a lot of brain rectification on programmers who had grown up reading these bad books.

The distinguishing features of this book compared to the default recommended C Programming Language, 2nd Edition by Kernighan and Ritchie (may he rest in peace) is that this is a modern version covering upto latest C standard (C17 is recommended by the author as the default version to use for new projects) and teaches C the proper way. It provides guidance on how to understand and thereby avoid some of the dark corners of C (UB - Undefined Behavior, common security problems) early on without adding more mystery to it or covering it late or not at all as done in other books and it does all this in around 200 and odd pages.

While the focus of the book is C Standard and also covers few of the POSIX APIs (both unix and windows), it also has a chapter on Debugging, Unit Testing, Assertions (both compile time and run time), Compiler Options (especially to enable debug builds/sanitizers etc.), Static and Dynamic Analysis, that provide pointers towards tools that are necessary to write C professionally. It won’t go into depth on these since clearly that was not the focus of a book that has “Introduction” in the subtitle. You might have to read other books or documentation on these topics which are easy to find online nowadays and not the hardest part of writing C.

So, I highly recommend this book for a beginner software engineer (professional or otherwise) who knows programming and wants to learn C the right way.
20 reviews3 followers
November 21, 2020
I don't say the book is bad, but in my opinion, lacks important tips to be "An Introduction to Professional C Programming". I'll tell you what I was expecting to see in the book, so you can make your own judgment for yourself.

Date handling: when working with applications that gather data from different geographical locations, know-how properly handle dates is a must. You will not find anything about this subject in this book.

Shims: How to replace a library or function in an already compiled executable? It's very common that you have a binary that you don't have the source code and you need to change its behavior. Maybe this can sound hacky to you but I can assure you that this scenario is not that uncommon.

How to properly create a build pipeline for different platforms: There is a lot of confusion that comes from the use Make and specially CMake, which have a lot of deprecated functions and stack overflow have a lot of questions have a lot of opinionated answers, and "green check" answers with outdated information. I don't expect a full chapter about using this tools, but an example that works 80% of the cases it will be very nice.

Performance: How to make a simple tool or macro to measure which are the parts of your program take the most time to execute. I'm not talking about how to develop a performance framework that supports threads and all the possible causes, but a snippet that can help you with the initial diagnostic will be very valuable. Kudos if explains to you how to export this data in the JSON format that can be loaded for the chrome://tracing tools. Basic use of Valgrind if you want to go the extra mile.

Single header libraries: How to use and create single header libraries? How to solve common problems like "duplicate definition" error in a single header library. Good practices, why they are a thing, common pitfalls.

Webassembly: The future use of C for me is using emscripten to compile it to run in the browser. A chapter about how to migrate a simple C library to webassembly will prepare the reader for the future.

Once again, I'm not going to say that the book is bad, but I was expecting more.
8 reviews
September 24, 2022
Concise book on securely programming with C. Covers a good range of topics in detail including syntax, operator precedence, integer promotion, integer rank, bounds checking, and the standard library functions and their pitfalls, plus several debugging tools. Frequently discusses tricky points of the language and its library and things you need to remember about them, which is great. By way of complaints, a few paragraphs are tricky to parse, and the organization means there are a few very long chapters (I'm particularly thinking of the chapter on operators). But the book makes up for this in thoroughness.

Note that while this covers some newer C Standard features like static_assert() (from C11), it doesn't I think aspire to be as comprehensive about this as for example Modern C.
12 reviews
November 1, 2021
Somehow i love C. It is the mother of all languages and hell a lot of good stuff is written in it, including my Arch)
The book is somewhat not doing it job, or at least i felt so. It is not going to make you a professional and it is not a good one to start.
I would suggest reading "Modern C" instead - i liked it much more that this one...
Profile Image for Unplugged7413.
2 reviews
November 21, 2023
The author did not understand for which audience to write the book and wrote a book that will be unbearably boring and incomprehensible for beginners. And also advanced programmers who want to learn more about C will be absorbing a whole lot of water.

I found this book very difficult to read.
Better to learn it with the help of guides and documentation ig
Profile Image for Derik.
10 reviews1 follower
October 11, 2020
I enjoyed the approach of this book. It was practical, and it can be used as a reference when writing C programs. It is not a "introduction" to programming, is a book that exposes certain parts of the language that you should be aware of in real programming scenarios. It was a fun read.
Profile Image for GiuseppeB.
1 review
January 7, 2023
Effective C has been quite a nice read and a concepts refresher, I have at the same time to warn, this is not a C beginners book. If you are a beginner, start from the good old K&R, then consolidate with Effective C.


Profile Image for Anil.
135 reviews
December 26, 2020
Not a plain introductory book. Take cs50 on edX or some other online courses and come back for more. Definitely worth to read.
117 reviews
February 27, 2021
I pondered long on the rating for this book. I got through it pretty quickly - mostly because there was not much new information compared to the ANSI K&R book from so long ago. It does cover some C17 and C2x items, but not as much as I had hoped.

Sadly, I was left wanting. Then I remembered that the title says An Introduction. Ok, perhaps I was too quick to judge and read it too quickly.

I pondered longer and read through it a second time. Yep, there were a couple of items that were new to me. That actually excited me because as an educator, I am always looking for new ways to deliver ideas to my learners.

This book is actually better in the delivery of topics that the old K&R C Programming Language manual. This is not a textbook, but is an excellent resource for someone wanting a refresher on C or a programmer new to the language looking for a quick way to get up to speed. The sprinkling of CERT C details was especially helpful. I hope there will be a second edition with more examples.
7 reviews
November 11, 2023
"Effective C" is a bit of a rollercoaster. Some chapters get into the nitty-gritty details, almost to the point of being a snooze fest. On the flip side, some skim the surface, leaving you wanting more. One major gripe is the lack of example code. When it does pop up, it's often a mess, making it a headache to figure out and replicate on your own computer.

The memory allocation chapters are the shining stars here, providing solid insights. However, the rest can be a bit hit or miss. Admittedly, as a C newbie, some sections might be over my head. But, hey, a book called "Effective C" should cater to all levels, right?

In a nutshell, "Effective C" has its moments but falls short in a few key areas. If you're patient and experienced, you might get more out of it. For beginners like me, it's a bit of a bumpy ride.
Click to see my implementation of the example code and exercises in this book:
Profile Image for William Schram.
2,345 reviews99 followers
January 14, 2024
Effective C is a book about the C Programming Language by Robert C. Seacord. Seacord has over 40 years of programming experience, so his insights will be valuable. The book's cover has a robot perched on Cthulu's shoulder.

Seacord lost count of the times he had a freshly minted developer make a mistake or error in their code. These errors lead to data leaks and other terrible things. Seacord covers best practices in programming and expects you to follow them. He provides real-world examples of programming gone awry.

The book has eleven chapters. It covers everything you need to get started with the C Programming Language. It discusses the different data types and inputs the language accepts. Finally, it lists compilers and IDEs you can use.

I enjoyed the book. Thanks for reading my review, and see you next time.
1 review
September 9, 2025
Pretty good book.

Works as an excellent primer for more advanced C books and becomes a great book to refer back to. It also opens you up to further research without hinging important information on it and thus preventing proper understanding. Only a few times did I have to do further research and that was simply because I was curious to deeply understand underlying topics.

Essentially, whether you are a Computer Science student or not, this book will serve you well. It teaches you best practices straight out the box, is ordered very well and honestly is a great and easy read.
1 review
August 15, 2023
Fantastic read

The author does a magnificent job. The book is easy to read,and dense with important detail. Even if you are a programming expert, you will something from this book. Highly recommended to developers regardless of background.
Profile Image for Andrew.
166 reviews6 followers
Read
July 17, 2021
A C language overview. Now I've been exposed to all the ugliness haha. Ready to get started though.
11 reviews4 followers
April 14, 2023
whole book felt like I am reading blog. There aren't enought examples and ones it has is not explained enough. Definitelly not for beginners.
Profile Image for dev prabal.
18 reviews
July 7, 2022
I want to read it again! This book is more like "Secure coding in C" along with the introductions to all the programming constructs in C. However, it doesn't merely introduce a construct but also tells about its proper use, pitfalls, limitations, correlations, etc. This is not a very beginner-friendly book. But it does so good for a person who already has some knowledge about C. This is my second C book and I have started noticing changes in the way I code now in C. This book certainly has helped me to not only improve my own code (and become a better programmer as in having a holistic view of things) but also has greatly helped me to review others' code.


Also, as a matter of fact, this book is a very good reading experience! I almost completed the entire book traveling to and fro from office to home in bus. The language is simple and it doesn't expect you to code along while reading, however, it makes you to think on "many" edge cases in just very simple lines of code (max 10-20).
Displaying 1 - 19 of 19 reviews

Can't find what you're looking for?

Get help and learn more about the design.