Leanpub Header

Skip to main content

C23 Quick Reference

A Practical Guide to the New Features of Modern C

C23 Quick Reference
This book is 100% completeLast updated on 2026-07-26

C23 brings dozens of improvements that make the C language more modern, safer, and more convenient to use. This book helps you understand these new features through concise explanations, directly compilable examples, and practical guidance that is easy to reference. If you want to start adopting C23 without having to read the thick standard specification, this book is the right place to begin.

Minimum price

$20.00

$25.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
About

About

About the Book

C23 is the biggest evolution of the C language in recent years. This latest standard introduces various keywords, attributes, library utilities, and language improvements that make code more expressive, safer, and easier to maintain. However, finding practical ways to use these features is often not easy, because most references only explain the specification, not how to use them in daily work.

C23 Quick Reference is designed as a practical guide for programmers who want to start adopting C23 in new projects or when modernizing existing codebases. Each feature is concisely explained through syntax, directly compilable code examples, important notes, and information regarding compiler support. Instead of being a complete documentation of the ISO C23 standard, this book focuses on the most useful and most worthwhile features for modern programmers.

This book also serves as an ideal companion to C Programming: How to Think Like a C Programmer. If that book helps you understand fundamental concepts and the mindset of a C programmer, then this book helps you leverage the latest capabilities offered by C23. Together, they form a solid foundation for writing modern, clean C code that is ready to be used in today's software development.

Share this book

Author

About the Author

Budi Raharjo

C/C++ Programmer since 2000.

Contents

Table of Contents

Preface

  1. Who This Book Is For
  2. What This Book Covers
  3. How to Use This Book
  4. Compiler Support

Chapter 1. Getting Started with C23

  1. 1.1 What Is C23?
  2. 1.2 What’s New in C23?
  3. 1.3 Enabling C23 in Your Compiler
  4. 1.4 Writing Portable C23 Code
  5. 1.5 C23 Feature Availability

Chapter 2. New Keywords

  1. 2.1 bool, true, and false
  2. 2.2 nullptr
  3. 2.3 thread_local
  4. 2.4 static_assert
  5. 2.5 constexpr
  6. 2.6 auto
  7. 2.7 typeof
  8. 2.8 typeof_unqual

Chapter 3. Literals and Initializers

  1. 3.1 Binary Integer Literals
  2. 3.2 Digit Separators
  3. 3.3 Empty Initializers
  4. 3.4 Improvements to Compound Literals

Chapter 4. Attributes

  1. 4.1 Attribute Syntax
  2. 4.2 [[deprecated]]
  3. 4.3 [[fallthrough]]
  4. 4.4 [[maybe_unused]]
  5. 4.5 [[nodiscard]]

Chapter 5. Type System Improvements

  1. 5.1 Fixed-Width Integer Enhancements
  2. 5.2 _BitInt
  3. 5.3 Decimal Floating-Point Types
  4. 5.4 Improved Enumeration Support

Chapter 6. The Modern Preprocessor

  1. 6.1 #warning
  2. 6.2 #embed
  3. 6.3 __has_include
  4. 6.4 __has_c_attribute
  5. 6.5 Feature-Test Macros

Chapter 7. Checked Integer Arithmetic

  1. 7.1
  2. 7.2 ckd_add()
  3. 7.3 ckd_sub()
  4. 7.4 ckd_mul()
  5. 7.5 Writing Overflow-Safe Code

Chapter 8. Bit Manipulation Utilities

  1. 8.1
  2. 8.2 Counting Leading Zeros
  3. 8.3 Counting Trailing Zeros
  4. 8.4 Counting One Bits
  5. 8.5 Bit Width
  6. 8.6 Bit Floor
  7. 8.7 Bit Ceiling
  8. 8.8 Bit Rotation

Chapter 9. Character and Unicode Improvements

  1. 9.1 UTF-8 Character Literals
  2. 9.2 UTF-8 String Literals
  3. 9.3 Unicode Support Updates
  4. 9.4 Character Encoding Improvements
  5. 9.5

Chapter 10. Library Additions

  1. 10.1 New Standard Headers
  2. 10.2 Updated Standard Library Functions
  3. 10.3 Frequently Used Library Enhancements

Chapter 11. Migrating to C23

  1. 11.1 From C11 to C23
  2. 11.2 From C17 to C23
  3. 11.3 Adopting C23 Incrementally
  4. 11.4 Common Migration Pitfalls
  5. 11.5 Compiler Compatibility Notes

Appendix A — New Keywords

  1. Quick Migration Guide
  2. Notes

Appendix B — New Attributes

  1. Standard Attributes
  2. Quick Migration Guide
  3. Notes

Appendix C — New Headers

  1. New Standard Headers
  2. Frequently Used Functions
  3. Quick Example
  4. Notes

Appendix D — New Preprocessor Directives

  1. #warning
  2. #embed
  3. Comparison
  4. Related Directives
  5. Quick Migration Tip

Appendix E — New Feature-Test Macros

  1. __has_include
  2. __has_c_attribute
  3. Typical Usage
  4. Comparison
  5. Best Practice

Appendix F — C17 vs C23 at a Glance

  1. Language Features
  2. Literals
  3. Attributes
  4. Standard Library
  5. Preprocessor
  6. Migration Summary
  7. One-Minute Checklist

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub