#include <stdio.h> main(t,_,a) char *a; { return!0<t?t<3?main(-79,-13,a+main(-87,1-_,main(-86,0,a+1)+a)): 1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13? main(2,_+1,"%s %d %d\n"):9:16:t<0?t<-72?main(_,t, "@n''+,#''/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l+,/n{n+,/+#n+,/#\ ;#q#n+,/+k#;*+,/''r :''d*''3,}{w+K w''K:''+}e#'';dq#''l \ q#''+d''K#!/+k#;q#''r}eKK#}w''r}eKK{nl]''/#;#q#n''){)#}w''){){nl]''/+#n'';d}rw'' i;# \ ){nl]!/n{n#''; r{#w''r nc{nl]''/#{l,+''K {rw'' iK{;[{nl]''/w#q#n''wk nw'' \ iwk{KK{nl]!/w{%''l##w#'' i; :{nl]''/*{q#''ld;r''}{nlwb!/*de}''c \ ;;{nl''-{}rw]''/+,}##''*}#nc,'',#nw]''/+kd''+e}+;#''rdq#w! nr''/ '') }+}{rl#''{n'' '')# \ }''+}##(!!/") :t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main(*a==''/'')+t,_,a+1) :0<t?main(2,2,"%s"):*a==''/''||main(0,main(-61,*a, "!ek;dc i@bK''(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);
🔒 Locked
Obfuscated Code
Advertisement
Original Post
I thought one of the goals in programming is making your code understandable...
The following is an actual program....try to figure out what it does WITHOUT COMPILING IT...I tested it, and it does compile (with a few modifications) under MSVC++ 6
Ya know...they even made a contest out of it...
_____________________________________________________
ICQ #: 149510932
Google - OpenGL - DirectX - Windows Guide Network - MSDN - Symantec Virus Info
"Imagination is more important than knowledge." - Albert Einstein
quote:
Original post by Lohrno
My guess is it prints a string, but that string is encoded.
-=Lohrno
Actually, it prints 12 strings...
_____________________________________________________
ICQ #: 149510932
Google - OpenGL - DirectX - Windows Guide Network - MSDN - Symantec Virus Info
"Imagination is more important than knowledge." - Albert Einstein
quote:
Original post by pouya
Wow, Programmer One finally finds the 17-year-old IOCCC.
So All I can say is: Hello and welcome to 17 years ago!
Oh, ok, old timer...
_____________________________________________________
ICQ #: 149510932
Google - OpenGL - DirectX - Windows Guide Network - MSDN - Symantec Virus Info
"Imagination is more important than knowledge." - Albert Einstein
Does it print out the 12 days of christmas? Beacuse I ahve seen and compiled that one before, and it seems fairly similar
ACTUALLY... I change my mind... it IS the twelve days of christmas
main(t,_,a) gave it away to my memory
-Chris Bennett of Dwarfsoft - The future of RPGs
GPA
Thanks to all the goblins in the GDCorner niche
ACTUALLY... I change my mind... it IS the twelve days of christmas
main(t,_,a) gave it away to my memory
under borland I believe I had to compile it more like this:
because it wouldn't work otherwise
-Chris Bennett of Dwarfsoft - The future of RPGs
GPA
Thanks to all the goblins in the GDCorner niche
[edited by - dwarfsoft on April 10, 2002 11:38:37 PM]
#include <stdio.h>
main1(t,_,a) char *a; { ... } /* all that stuff in here, changing all recursive calls to "main" to "main1" instead */
main(t,_,a) char *a; { main1(t,_,a); }
because it wouldn't work otherwise
[edited by - dwarfsoft on April 10, 2002 11:38:37 PM]
quote:
Original post by dwarfsoft
changing all recursive calls to "main" to "main1" instead
C++ doesn''t allow recursion of main, but I''m pretty sure that C does. Maybe that''s why?

yeah, well I didn''t have a simple C compiler, and anyway, I am only recalling this from memory. I don''t have my borland cd and the only thing I have installed is MSVC6, which although may compile will not run as expected.
Oh, and for MSVC6 I believe you need to initialise t as an int.
-Chris Bennett of Dwarfsoft - The future of RPGs
GPA
Thanks to all the goblins in the GDCorner niche
Oh, and for MSVC6 I believe you need to initialise t as an int.
quote:
Original post by pouya
Unix: This is my favorite
void main() { while(1) fork(); }
Your sysadmin will kill you for that!
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!
quote:
Original post by pouya
Windows:
#include <windows.h>
void main() { HWND blah; UpdateWindow(blah); } /* uninitialized */
Unix: This is my favorite
void main() { while(1) fork(); }
I disagree:
void main() {int i=0;1/i;}
is shorter. But not as much fun as the unix one.
EDIT: Meh. Still wrong.
[edited by - Sandman on April 11, 2002 6:10:59 AM]
quote:
Original post by dwarfsoft
Do not meddle in the affairs of moderators, for they are subtle and quick to anger.
Um, well, interesting to find my posts censored - considering that the exchange with dwarfsoft was pretty mild as they go. Whatever.
At any rate, again here''s the answer to the question I asked above since dwarfsoft removed it along with the other comments:
main;
please open a new .CPP file, write
main;
into it, and try to compile.
[edit]darn, it compiles under C. Mea Culpa.
Forever trusting who we are
And nothing else matters - Metallica
[edited by - Gabriel Fleseriu on April 11, 2002 4:03:45 PM]
main;
into it, and try to compile.
[edit]darn, it compiles under C. Mea Culpa.
Forever trusting who we are
And nothing else matters - Metallica
[edited by - Gabriel Fleseriu on April 11, 2002 4:03:45 PM]
I guess I use C++ for too long by now. A source file like
main;
triggers my automathical bullshit detector. As I said: mea culpa - you right, me wrong.
[edit]typo
Forever trusting who we are
And nothing else matters - Metallica
[edited by - Gabriel Fleseriu on April 11, 2002 4:40:54 PM]
main;
triggers my automathical bullshit detector. As I said: mea culpa - you right, me wrong.
[edit]typo
Forever trusting who we are
And nothing else matters - Metallica
[edited by - Gabriel Fleseriu on April 11, 2002 4:40:54 PM]
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement