J
J.L.Cooper
I have been looking at the winning entries for the International Obfuscated
C Contest (Shame I missed it till it had closed, well next time I will get
an entry in) and I was wondering if anyone has any good suggestions for
tricks that can be used to Obfuscate C code. *
Some trick that I like to use include the following.
a^=a;
instead of
a=0;
5;
instead of
b[5];
and of course
a=(!(a^a))?1:0;
instead of
if (a) {
a=0;
} else {
a=1;
}
* Before people take great delight in flaming me for posting this I would
like to say that I am not actively stating that C should ever be coded like
this except when entering an Obfuscated competition.
C Contest (Shame I missed it till it had closed, well next time I will get
an entry in) and I was wondering if anyone has any good suggestions for
tricks that can be used to Obfuscate C code. *
Some trick that I like to use include the following.
a^=a;
instead of
a=0;
5;
instead of
b[5];
and of course
a=(!(a^a))?1:0;
instead of
if (a) {
a=0;
} else {
a=1;
}
* Before people take great delight in flaming me for posting this I would
like to say that I am not actively stating that C should ever be coded like
this except when entering an Obfuscated competition.