Enlightened Minds

enlighten and be enlightened

Archive for the ‘Programming’ Category

Think you are coder??
OR Facing some problem with Coding??
OR Have some really cool logic/Program to share???
OR Want solution to some Programming problem??
OR Need any Software Advice???
OR Wanna know some Programming Tips and Tricks??

Then this category is Just for You..

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.

Posted in Codes n Algos | 3 Comments »