Having trouble reading this email? View it in your browser.
New This Week

C++ Brain Teasers »

Unravel challenging C++ mysteries, learn to avoid common pitfalls, and put better code into production by taking on 25 fun and mind-bending puzzles. As you work through each puzzle, you will peel off some of the layers of complexity of C++, getting a fundamental understanding of how the language works. This will help you write better code and recognize issues more easily while debugging.

Recently Released:


Best Sellers:

Make sure you haven't missed anything!

  1. Automate Your Home Using Go
  2. High Performance PostgreSQL for Rails
  3. Effective Haskell
  4. Programming Phoenix LiveView
  5. Machine Learning in Elixir

See all best sellers...

C++ Brain Teasers
November 08, 2023

C++ Brain Teasers: Exercise Your Mind

Each puzzle in the book is a complete, seemingly simple C++ program, but can you figure out the output for each, or will the answers stump you? Most of the programs compile and have deterministic, though sometimes surprising, output. Some might, however, have undefined behavior, where anything can happen, including making demons fly out of your nose! Yet others might have unspecified behavior with output that is not completely deterministic; we just know nothing as bad as nasal demons will happen.

All puzzles are accompanied by detailed discussions, taking a look under the hood at what exactly is going on to help you understand more about C++'s unexpected behaviors, as well as fundamental concepts like initialization, overload resolution, and implicit conversions. For the non-deterministic cases, we’ll explore some typical behaviors one can expect to see in practice, what causes them, and why they shouldn’t be relied on.

After working through the book, you’ll have tools and techniques to help you write better and safer code, and a better understanding of the fundamentals of the language, the background for some of C++'s apparent weirdness, and a better feel for identifying bugs and unsafe code in your own programs.

Now available in beta from pragprog.com/titles/akbrain.

Do More with What You Know

From paperbacks and ebooks to online courses and beyond, if you want to create technical content, we may be your perfect partner.

Leverage our 20+ years of experience, our global distribution network, our massive fan base, our relationships with industry leaders, our editorial, production, and marketing prowess, and even our reputation for excellence. Sure, you could go it alone, but with some of the highest royalties in all of traditional publishing and your own personal team, why would you bother?

Shoot us an email at proposals@pragprog.com or visit pragprog.com/publish-with-us for more details today.

Let's publish something together!

Upcoming Author Appearances

  • 2023-11-14 Frances Buontempo, MeetingCpp/Berlin
  • Be the First

    Sign up for this newsletter at https://pragprog.com/newsletter/ and be the first to hear about our newest content, best promotions, and upcoming events.

    Want even more? Follow @pragprog on Twitter and The Pragmatic Programmers on LinkedIn for commentary, news, job openings, and even puzzles.

    And, if you want, you can see what Dave Thomas (@pragdave) is up to.

    Thanks for your continued support,

    By Professional Developers, for Professional Developers

    Sent by the Pragmatic Programmers, LLC. • 9650 Strickland Rd Ste 103-255• Raleigh NC 27615