Posted By

darkphotn on 01/13/08


Tagged

c code crazy elite wtf


Versions (?)

Crazy C++ Code


 / Published in: C++
 

Yes, this is valid code.

Designed by myself, unless otherwise noted.

  1. char *s = "DEHLORW";
  2. char *d = "2133464530";
  3.  
  4. for(i=0; d[i]; i++)
  5. cout << s[d[i]-'0'];
  6.  
  7. ///////////////////////////
  8.  
  9. i = 1<<1;
  10. i |= 1;
  11. cout << (i<<2) << ":" << (i>>2) << (i==2);
  12.  
  13. /////////////
  14.  
  15. x = 0;
  16. cout << (x==0) << (x=0) << (0);
  17.  
  18. ////////////////////////////
  19.  
  20. class c{
  21. c(int i=0);
  22. public: int a;
  23. };
  24.  
  25. c::c(int i): a(i) {}

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: dtcs on February 7, 2008

this is similar to the obfuscated C code contest at http://www.de.ioccc.org/main.html

You need to login to post a comment.