Brain Teasers for Coders?
calvinandhobbes asks: "There are about 200 people working on different projects and most of them do programming without having an idea of what they actually do. they have little understanding of OS internals and primitive hacking skills. I want to enthuse them by providing some challenges by which they touch upon complex computing concepts, while solving the problem. Does anyone know of a set of C-based hacks or puzzles with which I can enthuse these budding programmers and testers?"
Programming Challenges is a nifty book by Steven Skiena and Miguel Revilla. It's a selection of problems from the Online-Judge problem set. There's a lot of nifty stuff in there - sorting, graph theory, number theory, etc.
Best of all, when folks solve the problems, they can submit their solutions online to see if they pass muster!
The Army reading list
Just looked on google and there's a ton of stuff. Quite interesting was Cprogramming.com's C++ Programming Challenge, but there's loads more....
Those who can make you believe absurdities can make you commit atrocities. - Voltaire
TopCoder
Surprised noone's suggested this one yet. One of my favorites. If you can solve these puzzles, you know C.
Well, it's not C, but the Python Challenge is an excellent multilevel programming riddle. Each level builds upon discoveries from previous levels, and encourages deep exploration of the Python library. I got about 1/3 of the way through before being stumped and running out of time to devote to it, but I bet it'd be super fun with a team working on it.
According to the C Standard, it invokes undefined behavior. So, answer is anything the compiler wants it to do.
Anonymous Cowards suck.