domingo, 14 de agosto de 2011

C No Evil

C No Evil: "

Your mortal enemy would like to ship a really great product in a week or two. Towards the goal of maximally delaying this product, you may inject a single C preprocessor definition into one of their header files. What is it? Keep in mind that anything which stops the project from compiling will be rapidly detected and therefore does not meet the goal.

Here are a few examples to get started with (some my own, some from a Reddit thread today).

#define FALSE 1

#define FALSE exit()

#define while if
#define goto

#define struct union

#define assert(x)

#define volatile

#define continue break
#define double int
#define long short
#define unsigned signed

Have fun.

Update: Someone on hacker news posted a link to The Disgruntled Bomb, which is based on the same idea. Nice!


Nenhum comentário:

Minha lista de blogs