Enlightened Minds

enlighten and be enlightened

Map of India By Obfuscated Coding..

Posted by Archit Jain on June 22, 2008

Following is a code which prints the Map of India..

Try to decode it.. How it works…

#include “Stdio.h”
#include “iostream”
using namespace std;
main()
{
int a,b,c;
int count = 1;
for (b=c=10;a=” \TFy!QJu ROo TNn(ROo)SLq SLq ULo+\
UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\
NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\
HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\
T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\
Hq!WFs XDt!” [b+++21]; )
{

for(; a– > 64 ; )
putchar ( ++c==’Z’ ? c = c/ 9:33^b&1);
}
system(“pause”);
return 0;
}

This method of coding is known as Obsfucated coding
Obfuscated code is source code that is very hard to read and understand. Some languages are more prone to obfuscation than others. C, C++ and Perl are most often cited as easily obfuscatable languages. Macro preprocessors are often used to create hard to read code by masking the standard language syntax and grammar from the main body of code.

Obfuscated code has its advantages and disadvantages. For instance it minimizes code size though, and however, is extremely difficult to debug.

3 Responses to “Map of India By Obfuscated Coding..”

  1. The U know who said

    Bhatia yar,
    I would really appreciate if u could keep adding updates to this block as well.
    Since, we are all in 3rd year, I think it goes without saying that we all need a lot of coding practice. try ur best to upload a problem, every week so that for all of us who are so dependent on this beautiful initiative on your part, We the coe ppl become gud in coding as well.

    Thanks a lot,
    A silent classmate of yours

  2. The U know who said

    This is only a suggestion though.
    I must saying is pretty easy….
    But do try your best yar.

    regards
    The Unknown

  3. anubhavjain346 said

    yaar bhatai…the code is not working for me……

    or might be i am not able to make the code work…..any help you can give??

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>