Skip to content

Comment on A nice, little known C feature: Static array indices in parameter declarations

Comments

Can someone recommend a resource that talks about some interesting C stuff similar to this? I've looked at "Expert C Programming: Deep C Secrets" but found it a bit outdated. And the C standard is a bit dry :-).

You might look at 21st Century C: C Tips from the New School by Ben Klemens. It's very new (November 2012), and has some really nice stuff in it.

It's getting mixed reviews, but I really found it useful (even if I, like others, disagree with some of his tips). It's particularly good at sorting out what you can do in C99 and C11.

[edit: He has a really useful section on sorting out the different meanings of "static" in C, though I don't recall this being one of them.]

The International Obfuscated C Code Contest (http://ioccc.org/) has some real gems.

Compiling another language to C is good way to learn a lot about C's nooks and crannies.

You could also look at C coding standards such as the MISRA guidelines. While many things they complain about should be obvious, there will inevitably be some really obscure things they urge you not to try.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.