Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Most unreadable code I'v ever seen

Most unreadable code I'v ever seen

Scheduled Pinned Locked Moved The Lounge
comquestion
20 Posts 14 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Philip Fitzsimons

    12 days of Christmas...


    "When the only tool you have is a hammer, a sore thumb you will have."

    P Offline
    P Offline
    Philip Patrick
    wrote on last edited by
    #9

    You knew that! You knew that! :) :) :) :-D Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

    P 1 Reply Last reply
    0
    • P Philip Patrick

      You knew that! You knew that! :) :) :) :-D Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

      P Offline
      P Offline
      Philip Fitzsimons
      wrote on last edited by
      #10

      nah, just did a search on google for one of the variable names :) http://www.google.com/search?sourceid=navclient&q=fxntdCeghiry[^]


      "When the only tool you have is a hammer, a sore thumb you will have."

      1 Reply Last reply
      0
      • P Pete Bassett

        MSCV++ Says "AARRGGGHHH" --------------------Configuration: TestCppApp - Win32 Debug-------------------- Compiling... StdAfx.cpp Compiling... TestCppApp.cpp C:\Work\TestCppApp\TestCppApp.cpp(8) : error C2065: 't' : undeclared identifier C:\Work\TestCppApp\TestCppApp.cpp(8) : error C2065: '_' : undeclared identifier C:\Work\TestCppApp\TestCppApp.cpp(8) : error C2065: 'a' : undeclared identifier C:\Work\TestCppApp\TestCppApp.cpp(9) : error C2448: '' : function-style initializer appears to be a function definition C:\Work\TestCppApp\TestCppApp.cpp(9) : fatal error C1004: unexpected end of file found Error executing cl.exe. TestCppApp.exe - 5 error(s), 0 warning(s) Pete

        T Offline
        T Offline
        Tomasz Sowinski
        wrote on last edited by
        #11

        The code is 'C', without plusplus part. Tomasz Sowinski -- http://www.shooltz.com

        *** Si fractum non sit, noli id reficere. ***

        1 Reply Last reply
        0
        • P Philip Patrick

          Look at the code below and try to tell me what it does :) Note, that you can compile and run it to see. From the first sight this is just a garbage, but dig a bit inside, you will see that the code is fine and "logical".

          //wow.c - compile and run
          #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);
          };

          Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

          A Offline
          A Offline
          Atlantys
          wrote on last edited by
          #12

          Looks like someone's using regular expressions! :-D :-D

          1 Reply Last reply
          0
          • P Pete Bassett

            MSCV++ Says "AARRGGGHHH" --------------------Configuration: TestCppApp - Win32 Debug-------------------- Compiling... StdAfx.cpp Compiling... TestCppApp.cpp C:\Work\TestCppApp\TestCppApp.cpp(8) : error C2065: 't' : undeclared identifier C:\Work\TestCppApp\TestCppApp.cpp(8) : error C2065: '_' : undeclared identifier C:\Work\TestCppApp\TestCppApp.cpp(8) : error C2065: 'a' : undeclared identifier C:\Work\TestCppApp\TestCppApp.cpp(9) : error C2448: '' : function-style initializer appears to be a function definition C:\Work\TestCppApp\TestCppApp.cpp(9) : fatal error C1004: unexpected end of file found Error executing cl.exe. TestCppApp.exe - 5 error(s), 0 warning(s) Pete

            S Offline
            S Offline
            Simon Capewell
            wrote on last edited by
            #13

            You need to compile it as a .c file, not .cpp, since it uses C style function declarations!

            1 Reply Last reply
            0
            • P Philip Patrick

              Look at the code below and try to tell me what it does :) Note, that you can compile and run it to see. From the first sight this is just a garbage, but dig a bit inside, you will see that the code is fine and "logical".

              //wow.c - compile and run
              #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);
              };

              Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

              T Offline
              T Offline
              Tomasz Sowinski
              wrote on last edited by
              #14

              International Obfuscated C Code Contest website[^] Tomasz Sowinski -- http://www.shooltz.com

              *** Si fractum non sit, noli id reficere. ***

              1 Reply Last reply
              0
              • P Pete Bassett

                MSCV++ Says "AARRGGGHHH" --------------------Configuration: TestCppApp - Win32 Debug-------------------- Compiling... StdAfx.cpp Compiling... TestCppApp.cpp C:\Work\TestCppApp\TestCppApp.cpp(8) : error C2065: 't' : undeclared identifier C:\Work\TestCppApp\TestCppApp.cpp(8) : error C2065: '_' : undeclared identifier C:\Work\TestCppApp\TestCppApp.cpp(8) : error C2065: 'a' : undeclared identifier C:\Work\TestCppApp\TestCppApp.cpp(9) : error C2448: '' : function-style initializer appears to be a function definition C:\Work\TestCppApp\TestCppApp.cpp(9) : fatal error C1004: unexpected end of file found Error executing cl.exe. TestCppApp.exe - 5 error(s), 0 warning(s) Pete

                S Offline
                S Offline
                Shaun Wilde
                wrote on last edited by
                #15

                using VS6 open VS6 new file name wow.c copy and paste the above (newline after the #include) hit compile and VC6 will make a project for you - enjoy

                Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

                1 Reply Last reply
                0
                • _ _Magnus_

                  It never works in the first place so no one have to maintain it, i just throw it away and start over again. :) (A few monhts ago i actually wrote something i could compile!) /Magnus


                  - I don't necessarily agree with everything I say

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #16

                  do you write code or curse at the compiler :-)

                  _ 1 Reply Last reply
                  0
                  • P Philip Patrick

                    Look at the code below and try to tell me what it does :) Note, that you can compile and run it to see. From the first sight this is just a garbage, but dig a bit inside, you will see that the code is fine and "logical".

                    //wow.c - compile and run
                    #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);
                    };

                    Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

                    T Offline
                    T Offline
                    Tim Lesher
                    wrote on last edited by
                    #17

                    And the coolest part is that if you rot13 it, it's legal PERL. ;-) Tim Lesher http://www.lesher.ws

                    1 Reply Last reply
                    0
                    • L Lost User

                      do you write code or curse at the compiler :-)

                      _ Offline
                      _ Offline
                      _Magnus_
                      wrote on last edited by
                      #18

                      I have learned trough experience that i save a lot of time if i skip the code writing and just start cursing right away. :) /Magnus


                      - I don't necessarily agree with everything I say

                      1 Reply Last reply
                      0
                      • P Philip Patrick

                        Look at the code below and try to tell me what it does :) Note, that you can compile and run it to see. From the first sight this is just a garbage, but dig a bit inside, you will see that the code is fine and "logical".

                        //wow.c - compile and run
                        #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);
                        };

                        Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

                        R Offline
                        R Offline
                        Richard Green
                        wrote on last edited by
                        #19

                        Heh - this reminds me of a piece of code i wrote when i was bored at work one day, http://www.sietch.co.uk/helloworld2.cpp[^] you can guess what it does by the name of the file but it was fun to write :)

                        1 Reply Last reply
                        0
                        • P Philip Patrick

                          Look at the code below and try to tell me what it does :) Note, that you can compile and run it to see. From the first sight this is just a garbage, but dig a bit inside, you will see that the code is fine and "logical".

                          //wow.c - compile and run
                          #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);
                          };

                          Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

                          J Offline
                          J Offline
                          Jon Sagara
                          wrote on last edited by
                          #20

                          :wtf: Jon Sagara Help me out here, Spock. I don't speak stupid.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups