C++ humor: a –do not modify the comments or format– horror code

just in case you think, you can understand what the code is doing by looking at it

executable at Ideone

#include <iostream>
#define B(l,a) __##l##E##__
#define _O_ ((1<<2>>1<<1)-2)
#define _h_ 7-3
#define _C_ (7/_h_)
#define _r_ ((1<<0)+0x00a/2+_C_)
#define _a_ ((1<<5)-_r_)
#define _p_ { void _(){} namespace
#define printf(_0_) squeak(_O_,B(LIN,!)-_a_); _
 
// this
// is weird
 
namespace _p_ {
void squeak(int,int who) {      switch (who) {
                case _O_: std::cout<<"\x71\x75\x61\x6b"<<std::endl; break;
                case (_h_+_C_-2): std::cout<<"\x6d\x65\x6f\x77"<<std::endl; break;
                case _h_: std::cout<<"\x62\x6f\x77"<<std::endl; break;
                default: std::cout<<"\x62\x6c\x61\x68"<<std::endl; break;
        };
}}
}
 
// do not review ...
 
int main()
{
        printf("hello\n");
        printf("this\n");
        printf("is\n");
        printf("not\n");
        printf("funny\n");
        printf("at all!\n");
        return 0;
}
 
//expected output:
//meow
//blah
//quak
//blah
//bow
//blah

 

1 thought on “C++ humor: a –do not modify the comments or format– horror code

  1. Pingback: c++ humor: you don't know what it does | DLed : Music / Photography / Programming / Notes

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.