Cover of The C puzzle book

The C puzzle book

by Alan R. Feuer · first published 1982

17mentions
10recommended by
11HN commenters
2009–2022first – last mentioned

91% recommend9% neutral

Why HN recommends it

Puzzle-style exercises that expose C's corner cases and low-level quirks. Working through them builds a firm grasp of the language and suits those who already know basic C.

Summarised by Claude from recommending comments

Affiliate links. As an Amazon Associate I earn from qualifying purchases.

Mentions per year

30 2007: 0 mentions2008: 0 mentions2009: 3 mentions2010: 2 mentions2011: 0 mentions2012: 0 mentions2013: 0 mentions2014: 0 mentions2015: 1 mention2016: 1 mention2017: 0 mentions2018: 0 mentions2019: 1 mention2020: 1 mention2021: 0 mentions2022: 3 mentions2023: 0 mentions2024: 0 mentions2025: 0 mentions2026: 0 mentions200720172026

What Hacker News says

  • screwperman · Apr 26, 2009 · Recommends

    …machine architecture and Unix. Diving into a large codebase will get you acquainted with "modern" C. I've found the book C Traps and Pitfalls to be the book to get you to think like a C programmer. The C Puzzle Book is pretty good for exercises, and Expert C Programming does a good job exposing the ugly side of C.

    on “Ask HN: Learning C” ↗
  • pietrofmaggi · Jul 16, 2010 · Recommends

    C is a simple language with some pearls and a lot of corner cases. For the corner cases "C. Puzzle Book" by Alan R. Feuer it's a funny read with a lot of oh-oh moments. For the pearls... well I can give you a couple: - sizeof() macro is a good friend - ISO C99 <stdint.h> introduces Exact-width…

    on “Ask HN: An Advanced C Tutorial” ↗
  • LocalMan · Apr 7, 2015 · Recommends

    …when you have questions. The authors are Harbison and Steele. If you become a C programmer, you will want and need this book. So you may as well get a copy now. Another (more advanced) book is The C Puzzle Book. http://www.amazon.com/The-Puzzle-Book-Alan-Feuer/dp/02016046.... It's older and I'm not sure it's totally up-to-date with the latest version of C. But it's still very valuable. If you finish this…

    on “Ask HN: Should I use K&R to learn C?” ↗
  • wooby · Apr 26, 2009 · Recommends

    …almost a Part 2 of K&R and covers building problems and the Unix signal and file APIs. The examples are in an ancient syntax, but part of the fun is coding them and getting them to compile. 3. "The C Puzzle Book" (http://www.amazon.com/Puzzle-Book-Alan-R-Feuer/dp/0201604612) I found this one day at Fry's, and it's fucking awesome. You can effectively learn C using it without a compiler. Good luck!

    on “Ask HN: Learning C” ↗
  • pietrofmaggi · Sep 28, 2010 · Recommends

    If you enjoy this kind of puzzle "The C Puzzle Book" if full of them with a clear explanation: http://www.amazon.com/Puzzle-Book-Alan-R-Feuer/dp/0201604612 It's a funny little book that can keep you busy during compilation time. And the "C Reference…

    on “So you think you know pointers?” ↗
  • SloopJon · Jan 15, 2016 · Recommends

    When you're done with The C Programming Language, read Expert C Programming, C Traps and Pitfalls, and The C Puzzle Book. Then tell me how simple C is.

    on “A critique of "How to C in 2016"” ↗
  • SloopJon · Jul 28, 2016 · Recommends

    Seconded. I also recommend C Traps and Pitfalls and The C Puzzle Book to improve your understanding of this subtly complex language.

    on “Ask HN: Improve C language skills after K&R?” ↗
  • LocalMan · Mar 11, 2020 · Recommends

    …thousands of lines of C, but retired 15 years ago. The two best books I know are: 1. C: A Reference Manual, by Harbison and Steele. https://www.amazon.com/Reference-Manual-Samuel-P-Harbison/dp... 2. The C Puzzle Book, by Alan Fueur. https://www.amazon.com/Puzzle-Book-Alan-R-Feuer/dp/020160461... Harbison and Steele has much better explanations than K&R. The Fueur book taught me a lot about C declarations. Declarations…

    on “Ask HN: How do I learn C properly?” ↗
  • jhiant · Feb 27, 2022 · Recommends

    "The C Puzzle Book" by Alan R. Feuer For anything C/C++ related, grinding these little puzzles yielded tremendous value for the time spent and removed any lingering questions I had about annoying low level details of the…

    on “Ask HN: The book that did it for you in math and/or CS?” ↗
  • harry8 · Jul 27, 2022 · Recommends

    …Alistair Moffat "Programming, Problem Solving and Abstraction" is one I found that seems better to learn C programming. Maybe other people have better recommendations than that..? Separate to that "The C Puzzle Book" is superb when you're learning to really thoroughly understand pointers, arrays and so on. Koenig's "C Traps and Pitfalls" isn't bad for some of the dark corners.

    on “What they don't teach you about sockets” ↗
  • pstevensza · May 4, 2010 · Recommends

    Thank you. Yet more sound advice from the HN community. The C Puzzle Book is good fun, and based on comments in the C threads, I cannot wait to get my hands on CII. I think I'll get my hands on this Programming in Objective-C 2.0 (2nd Edition) by Stephen G. Kochan and Erica…

    on “Ask HN: Objective-C programming book” ↗
  • phendrenad2 · Jan 8, 2019 · Recommends

    1) Get a book on C++ and stop reading once you get to classes and other C++ features. 2) Read these in any order: "The C Puzzle Book", "Deep C Secrets", "Class Construction in C and C++" (shows what C is capable of without touching C++ features).

    on “Best way to learn C in 2019?” ↗
  • vkazanov · Jul 14, 2022 · Recommends

    …along the same lines. Go through it, get a hang of the language then follow up with something like "Effective C" or "Modern C", which are good recent mid-level books on the language. I also like "The C Puzzle Book". Then there's a brilliant "Expert C Programming: Deep C Secrets" explaining subtle details of the language. One thing that is missing from the books is POSIX. The language itself is very barebones…

    on “Ask HN: How do I start learning about lower level compiled languages?” ↗
  • harry8 · Jul 18, 2022 · Recommends

    …something better than K&R for C by now - the example programming style can be improved upon while still appreciating its considerable strengths. In that general direction Van Der Linden's "Expert C" and "The C Puzzle Book" remain fantastic books to grok C and low level programming. The Wrox "Professional Assembly Language" is both out of date (32 bit x86) and still about your best bet, update it and play with the x86-64…

    on “Ask HN: Are older programming books useful?” ↗
  • harry8 · Nov 28, 2022 · Recommends

    "The C Puzzle Book" is the thing I recommend to anyone who knows they want to have a good, working understanding of how to use pointers programming in C. Many years ago I did the exercises on the bus in my head, then checking…

    on “Everything I wish I knew when learning C” ↗

Keyboard shortcuts

/
Focus search
j / k
Next / previous book
Enter
Open focused book
Esc
Close / go back
g h
Go to Home
g t
Go to Top all-time
g m
Go to Most recommended
g r
Go to Rising
g f
Go to For You
?
Show this help