Jump to ratings and reviews
Rate this book

Modern C

Rate this book
If you think "Modern" and "C" don't belong in the same sentence, think again. The C standards committee actively reviews and extends the language, with updated published C standards as recently as 2018. In Modern C, author Jens Gustedt teaches you the skills and features you need to write relevant programs in this tried-and-true language, including Linux and Windows, device drivers, web servers and browsers, smartphones, and much more!

Modern C teaches you to take your C programming skills to new heights, whether you're just starting out with C or have more extensive experience. Organized by level, this comprehensive guide lets you jump in where it suits you best while still reaping the maximum benefits.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

222 pages, ebook

46 people are currently reading
259 people want to read

About the author

Jens Gustedt

2 books1 follower

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
19 (21%)
4 stars
38 (42%)
3 stars
24 (26%)
2 stars
7 (7%)
1 star
1 (1%)
Displaying 1 - 13 of 13 reviews
Profile Image for Yuri Krupenin.
134 reviews363 followers
January 18, 2023
Очень хороший рефрешер + ознакомление с более новыми стандартами.

Единственная плохая вещь при таком чтении книги — где-то до середины она игнорирует поинтеры и всеми средствами пытается обходиться без них, что немного раздражает, но объяснимо, если предположить (цитаты на обложке склоняют) что это может быть и чьей-то первой книгой.

Не знаю, насколько я рекомендую её в этом качестве: от темпа ознакомления с бесконечными нюансами может и голова вскипеть (но как рефрешер, опять же, самое то).

Но я не знаю и насколько я в принципе рекомендовал бы кому-либо начинать изучать C в 2023 году, так что.
4 reviews1 follower
December 17, 2018
The idea of the book is excellent and all the tips and programming practices he shows in code are very updated and recommended. The prose is a bit dense sometimes and the code examples too thick with the explanations left for other parts of the book, which results in a kind of convoluted reading experience. Also the exercises are not very enlightening and look like an afterthought, at least in the edition as of the time of this review.
108 reviews8 followers
Read
May 7, 2021
Be wary of the programming language books that take their exercise from linear algebra. Be very wary.
123 reviews
July 2, 2024
Ok, this is not a horrible book. It is actually full of very useful information. My issue is with how it is delivered. To all of the reddit-ers who keep recommending this book to beginners, STOP! This is not a beginner text.

That is not the reason for the 3 stars, however. The rating is solely on the organization of the book. I really wanted to love this book and, again, there are many good sections that help to avoid bad coding form. This is a technical book and I love technical books...but it bounces around a lot and switches topics too quickly in some areas in order for the reader to understand what just happened and why this new topic is relevant. Being a seasoned C programmer, I can see where Jens was going with this.

Overall this suffers from a bit of a lack of cohesion. Jens, if you ever read this, please know that I get where you were trying to go with this, but it simply missed the mark.
24 reviews2 followers
November 5, 2020
This book can be downloaded for free in PDF format here:
https://modernc.gforge.inria.fr/

An in-depth look at the modern C11 standard.
In the beginning of the book (https://www.youtube.com/watch?v=JqHaJ...) we come across the basic stuff, but in a more analytical way than most books on C for beginners. In particular, we look at models of the language versus the implementation on a particular architecture.

As we move up the ladder we start looking at more advanced topics like pointers, macros and variadic functions, which are still topics you would encounter in older books on C (including beginners books). In this book, though, there is a focus on the C11 standards way of the using specific types on fx the pointers. There are also valuable takeaways throughout the book. Did you fx know that you should NOT use NULL for pointers, but rather the literal 0. This is because NULL hides away the actual expansion of NULL which is not always consistent.

There's also a good discussion on topics like qualifiers (including the not well known restrict).

In the last part of the book we really see the power of the modern C standard when looking at parallel threads, atomic access, memory consistency and consistency models. This is, in my opinion, where the book shines. We see how the C standard modernizes itself to be adaptable to multicore architectures. I do, however, miss a few more examples in the last chapter.

I left out a lot here, so check out the book (it's free!) to see what you're missing.

If nothing else, read the last part (Level 3) of the book to get up-to-date on threading and consistency models, if you're not already there.
Profile Image for Federico Lucifredi.
Author 2 books6 followers
December 23, 2019
Extremely detailed, but not as dry-cut as reading the actual standard. I really enjoyed the in-depth treatment of implicit typing of constants, and learned something I did not know about type promotion for arithmetic on shorts.

This book belongs on the shelf of the embedded developer, as a reference to discover what an unusual bit of macro syntax, a noreturn function, or similar highly-specialized C-feature not seen in application programming actually maps to.

Really up to date, the book covers the latest iterations of the C standard, often alongside the original K&R behavior.
1 review
May 15, 2023
This book is best for someone who is already a seasoned programmer who wants to attain a deeper level of understanding of how a C compiler interprets language syntax to organize memory and assign values therein. The goal this book sets out for itself is very worthwhile, and I really wanted to absorb the information it offers. However, doing so was difficult for me because, in my opinion, the writing simply lacks clarity. In just about every paragraph, there was at least one sentence whose meaning to me was utterly opaque at first. I could only attain comprehension by re-reading the sentence a time or two, analyzing the pronouns to make some guesses as to what they might refer to, thinking of the various meanings which might apply to a certain verb, and scanning the context back a paragraph or two to fill in the information I needed to build the most likely meaning of the sentence.

For one small example, here's a sentence:

Suppose strtoull is called as strtoull("0789a", &next, base). According to the value of the parameter base, that string is interpreted differently.

After a few seconds of staring at that, I came up with the following translation:

Suppose strtoull is called as strtoull("0789a", &next, base). In this call, strtoull will interpret the string value "0789a" in the first parameter in one of several possible ways, depending on the value supplied by the parameter "base".

Yes, I can usually figure out what the writing in this book is saying. It's just that I have to spend at least half my cognitive bandwidth deciphering the basic meaning of even relatively simple sentences. The subject material is challenging enough without this overhead. By his own admission, Jens Gustedt comes from a mathematical background. I have found that most mathematicians think and express themselves differently from most other people. This book could be improved if someone with a writing background were to edit it thoroughly. Few sentences would be left untouched.

Despite its lack of clarity in writing, I still think this book is useful. If you have the time and mental energy to decipher the prose, it can teach you a lot. Sometimes, the fact that you're not comprehending something in the text leads you to research it on Stack Exchange until you are able to understand the text. This is actually a rewarding experience. Moreover, the book provides an excellent framework of concepts, presented in a sensible order, which you can use as a study plan to deepen your understanding by consulting other sources in the order in which the book presents them. Then, you will have a thorough understanding of not just the C language, but how the C compiler and linker turn your code into something the computer can understand in order to perform useful tasks.
Profile Image for Tech Nossomy.
416 reviews6 followers
October 16, 2021
Released under a Creative Commons license, this book demonstrates that the C programming language is not only very versatile, but also still widely used. The target audience is the seasoned software programmer community and is approached in a non-patronising way. It is refreshing to see this collection of C idioms being presented as a reference handbook with good use of color to delineate text from C syntax and key messages. Every sentence is to the point.
There are the odd typos and the author speaks in the first person interchangeably in singular and plural.

Some humor too:
Some functions of the C library have parameters that receive the same boring arguments most of the time. This is the case for strtoul and relatives.
12 reviews
May 10, 2024
This was my first and so far the only book I’ve read about C.
I really liked the style and I think that it met my expectations. I wanted to learn enough to be able to understand the C code that I encounter in other books.
I skipped the challenges as I think they were really tough and required additional research (author was clear about that)
I only recommend this book if you have experience with other programming language and ideally some CS background.


10 reviews1 follower
November 9, 2024
Luckily, I was able to read most of the second edition.

The best part of this book isn’t about its up-to-date "modern features" but rather the author’s unique approach to the core of the C language. With the perspective of a language designer (the author serves on the ISO C committee), this book offers insights that few others provide.
Profile Image for Pranoy Dutta.
10 reviews
January 17, 2022
While the prose is not the greatest, the advice that it gives is wonderful. It is a great highly opinionated masterclass on C.
Profile Image for Emil Petersen.
433 reviews25 followers
June 27, 2016
I read the unfinished version (June 27th, 2016) and I had a really hard time going beyond much of 'Level 0' and 'Level 1'. It was just too hard for me, which might be my own fault - I should not have read this now when my C experience is so sparse. Jens Gustedt obviously knows what he is writing about and I believe the book will be much better in its later and final form. But for now, it was not. I will reread when it's done and sprinkle it with more stars (if worthy).

A lot of sections need to be rewritten and the format is pretty.. weird some places. A whole section is missing and many are unfinished - as the author acknowledges.
Profile Image for Mario García.
119 reviews3 followers
October 1, 2025
A very comprehensive and thorough overview of the modern C standard. I programmed in C back in the 90s and the language has gone through quite a few changes. This book helped me understand the current standard and how to use it in my programs. I confess that the last few sections were quite advanced and took some effort for me to understand them. I will probably go back to them at some point after I have need for it (especially the threading model).
Displaying 1 - 13 of 13 reviews

Can't find what you're looking for?

Get help and learn more about the design.