Skip to content

Instantly share code, notes, and snippets.

@jotaki
Created January 14, 2012 15:46
Show Gist options
  • Save jotaki/1611836 to your computer and use it in GitHub Desktop.
Save jotaki/1611836 to your computer and use it in GitHub Desktop.
Obfuscated Hello, World
/* compile with gcc -o obfhello obfhello.c -lm */
#define xR return
# define T typedef
# define E extern
# define S static
# define P putchar
# define Z ((V*)0)
#define Bb main
# define X int
# define A char
# define H void
# define Q sqrt
# define G double
#define U 3
T X Y;T A C;T C** O;T H V;T G D;E D Q(D x);E Y P(Y c);S Y (*o)(Y c)=P;S D
(*f)(D x)=Q;S Y s_(M)Y M;{xR(Bb(M,Z));}S Y _[]={(9*31+22)*10+56*2+14,(((U*15+72)
-1)/2+17)*1.4-5,12*U,1*100+9*11-U,(0x2357*2.3-72.1)*-1,-((1<<9)+(1<<U)*34),(1<<
13)+(125<<U)+(U*8),32767>>5^2047,((4*16<<1)-(9*2))*U+70,-1024,-(66*10+16),-24*
1000-(900+(1<<6)),-3136,(2*256)^-768,225*4};Y Bb(I,v)Y I;O v;{S Y _0=0;xR(v!=Z?
s_(0110):(0<I)?o(I),s_((_0+=1,I+((((0>(_0-1)[_])?-1*(Y)f(-((_0-1)[_])):(Y)f(
(_0-1)[_]))>>1)^_0))):0);}
@iank
Copy link

iank commented Jan 14, 2012

Q.E.D.

@jotaki
Copy link
Author

jotaki commented Jan 14, 2012

iank wins! \o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment