When you think you have seen everything... This Palindromic C program was the winner of 1987's Obfuscated C Code Contest. A guy called Brian Westley is the author.

char rahc
[ ]
=
"\n/"
,
redivider
[ ]
=
"Able was I ere I saw elbA"
,
*
deliver,reviled
=
1+1
,
niam ; main
( )
{/*\}
\*/
int tni
=
0x0
,
rahctup,putchar
( )
,LACEDx0 = 0xDECAL,
rof ; for
(;(int) (tni);)
;
for ((int)(tni)++,++reviled;reviled* *deliver;deliver++,++(int)(tni)) rof
=
(int) -1- (tni)
;reviled--;--deliver;
(tni) = (int)
- 0xDECAL + LACEDx0 -
rof ; for
(reviled--,(int)--(tni);(int)(tni);(int)--(tni),--deliver)
rahctup = putchar
(reviled* *deliver)
;
rahctup * putchar
((char) * (rahc))
;
/*\
{\*/}
(int) (tni)
= reviled ; deliver =
redivider

The following is a complete program - a palindrome from end to end. It requires c99, which makes C++ style // comments OK:


#define tni /**/ //
#define niam /**/ //
#define args () /**/ //
#define sgra /**/ //
int main args
// }
{ //

printf ("This program is a palindrome\n"); //
// ;)"n\emordnilap a sa margorp sihT"( ftnirp

// {
} //
sgra niam tni
// /**/ args enifed#
// /**/ )( sgra enifed#
// /**/ main enifed#
// /**/ int enifed#
(thanks to theo for corrections)

Log in or register to write something here or to contact authors.