When I searched the web, I found an intersting program, I dont think I can explain a bit. But, I would like to share it. It displays my home country thats the most I can say about it!

Here goes,

#include<stdio.h>
main()
{
int a,b,c;
int count = 1;
for (b=c=10;a=
"- LLLLLL?, LMKC,XYZHELLO FOLKS,\
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);
}

I am Inferring something, here.

"Mythology"[5] ; is a valid c statment.

The code resides, in the memory & the constant "Mythology", resides with it.

So it will also have, a vaild address. and *("Mythology"+5) will return 'l'?

Am I right or am I worng?. Please Justify.

Strings are a pointer type (char * or more recently const char *), so yes you can use the subscript operator on them.

The program is not that cryptic after all.
This guy has fooled me.
I understand what the He's been doing.

And this is what I found.

1. Ascii value of ' ' is 32 & that of ! is 33.
2. c varies from 10 to 90 - totaly 80 ( no of rows in the consol )
3. Ascii value of new line is 10.
4. b & 1 will return 1 or 0. i.e., ! or ' '
5. value of a is the number of ' ' & no of !

I cant belive I wasted 30 minutes in it.

Hope you guys agree with me.

i think this is an example of "obfuscated code"

perl programmers also love to do stuff like this.

I copied the concept and wrote one on my own. here it is.

#include<stdio.h>

int main ()
{
	int a , b = 0, c = 10 ;
	for ( ; a = "ECEEBDEEBDBBBDBDEB0\
			BBBBBBBBBBBBBBBBBBBBBABCBBBBBBH0\
			CFBFBFBFBDDFBI0\
			FBABCBBBBBBBBBBBBBABCBBBBBABB0\
			BFBBBBBBBBECBBBBBBBBBBBBBBC"[b++] ; ) 
		for ( ; --a > 63 ; )
			putchar ( ++c == 73? c-=63 : 32^b&1 ) ;
	return 0 ;
}

Days spent writing what it would take any sane person only a few minutes to write.
The same goes for reading them as well.

Mildly amusing, but you're not going to learn anything profound from picking apart IOCCC entries (only that some smart programmers have WAY too much time on their hands).

Well It took me about 40 minutes to code & 30 to analyse. Semester exams are going but, 70 minutes can be spared!

This question has already been answered. Start a new discussion instead.